A controversial overhaul of the EU's copyright law that sparked a fierce debate between internet giants and content creators has been rejected.
The proposed rules would have put more responsibility on websites to check for copyright infringements, and forced platforms to pay for linking to news.
A slew of high-profile music stars had backed the change, arguing that websites had exploited their content.
But opponents said the rules would stifle internet freedom and creativity.
The move was intended to bring the EU's copyright laws in line with the digital age, but led to protests from websites and much debate before it was rejected by a margin of 318-278 in the European Parliament on Thursday.
What were they voting for?
The proposed legislation - known as the Copyright Directive - was an attempt by the EU to modernise its copyright laws, but it contained two highly-contested parts.
The first of these, Article 11, was intended to protect newspapers and other outlets from internet giants like Google and Facebook using their material without payment.
But it was branded a "link tax" by opponents who feared it could lead to problems with sentence fragments being used to link to other news outlets (like this).
Article 13 was the other controversial part. It put a greater responsibility on websites to enforce copyright laws, and would have meant that any online platform that allowed users to post text, images, sounds or code would need a way to assess and filter content.
The most common way to do this is by using an automated copyright system, but they are expensive. The one YouTube uses cost $60m (£53m), so critics were worried that similar filters would need to be introduced to every website if Article 13 became law.
There were also concerns that these copyright filters could effectively ban things like memes and remixes which use some copyrighted material.
Stars fail to convince politicians
By Mark Savage, music reporter, BBC News
The combined clout of Paul McCartney, Annie Lennox, Placido Domingo and David Guetta wasn't enough to persuade MEPs to make sweeping changes to copyright law.
They were among 1,300 musicians who urged politicians to enact a law forcing sites like YouTube and Facebook to use filters that would stop users illegally uploading their music.
Musicians were being cheated out of money, they argued, even though websites were making huge profits off their work.
Critics said the laws would stifle creativity - with Creative Commons chief Ryan Merkley observing that The Beatles would have been prevented from performing cover versions under the proposed rules.
For you and me, it could have resulted in text, music and videos posted to blogs, social networks and comment sections being yanked from the net at point of upload - somewhat like YouTube's controversial Content ID system on steroids.
In the end, MEPs decided the changes needed more debate; and sent the proposals back to the Commission. The two sides will undoubtedly step up their campaigns in the meantime.
What has the reaction been?
Opponents of the Copyright Directive celebrated the news that MEPs had rejected it.
Julia Reda, a Pirate Party MEP who had campaigned against the changes, tweeted: "Great success: Your protests have worked! The European Parliament has sent the copyright law back to the drawing board."
Great success: Your protests have worked! The European Parliament has sent the copyright law back to the drawing board. All MEPs will get to vote on #uploadfilters and the #linktax September 10–13. Now let's keep up the pressure to make sure we #SaveYourInternet! pic.twitter.com/VwqAgH0Xs5— Julia Reda (@Senficon) July 5, 2018
Wikipedia co-founder Jimmy Wales told the BBC he hoped that the music industry could find a way to compromise before the September debate.
"Don't think about filtering everything everyone uploads to the internet. That's a pipe dream but you are never going to get that," he said.
Instead, he added, they should look to renegotiating deals with platforms such as YouTube to get "fairer remuneration".
BPI Music, which represents UK record labels, had supported the bill and said it would "work with MEPs over the next weeks to explain how the proposed directive will benefit not just European creativity, but also internet users".
We respect the decision by MEPs to have a plenary discussion on the draft Copyright Directive. We will work with MEPs over the next weeks to explain how the proposed Directive will benefit not just European creativity, but also internet users and the technology sector— bpi music (@bpi_music) July 5, 2018