A revamp of the EU's copyright rules has passed its final hurdle and will now come into law.
The rules include a section known as Article 13.
It says that if users upload infringing content to a service, the tech firm involved must either make a "best effort" to get permission from the rights holders or quickly remove it.
The UK was among 19 nations that supported the law in its European Council vote.
But Poland was one of those that objected on the grounds that it could pave the way to internet censorship.
EU sources say that five other countries also opposed the rules - Italy, Finland, Sweden, Luxembourg and the Netherlands - while Belgium, Estonia and Slovenia abstained.
Google had led lobbying efforts against the law's introduction.
At one point it had featured pop-up notices on its YouTube video-streaming service warning that the effort could have "unintended consequences", including the blocking of some of its clips to EU-based members.
In particular, there was concern that memes featuring clips from TV shows and films could no longer be shared. However, tweaks to the law subsequently made an exception for content used for the "purposes of quotation, criticism, review, caricature, parody and pastiche".
Even so, there is still a concern that smaller sites will struggle to track down and pay copyright holders or to develop content filters that automatically block suspect material.
Another controversial rule - which says that search engines and social media providers will have to pay news publishers to feature snippets of their content - also remains.
Wikipedia blacked out four of its European sites in protest last month. It said the rules would make information harder to find online and thus make it harder for its volunteers to source information.
But European media industry leaders have welcomed the effort.
"Publishers of all sizes, and other creators, will now have the right to set terms and conditions for others to reuse their content commercially, as is only fair and appropriate," commented Xavier Bouckaert, president of the European Magazine Media Association.
Helen Smith, executive chair of the Independent Music Companies Association, added: "It was a long road and we would like to thank everyone who contributed to the discussion. As a result, we now have a balanced text that sets a precedent for the rest of the world to follow, by putting citizens and creators at the heart of the reform and introducing clear rules for online platforms."
The EU's member states now have two years to adopt the rules into their national laws.