Controversial new copyright laws have been approved by members of the European Parliament.
The legislation had been changed since July when the first version of the copyright directive was voted down. Critics say it remains problematic.
Many musicians and creators claim the reforms are necessary to fairly compensate artists.
But opponents fear that the plans could destroy user-generated content, memes and parodies.
Leaders of the EU’s member states still need to sign off on the rule changes before the individual countries have to draft local laws to put them into effect.
The vote in Strasbourg was 438 in favour of the measures, 226 against and 39 abstentions.
MEPs voted on a series of changes to the original directive, the most controversial parts are known as Article 13 and Article 11.
Article 13 puts the onus on web giants to take measures to ensure that agreements with rights holders for the use of their work are working.
Critics say that would require all internet platforms to filter content put online by users, which many believe would be an excessive restriction on free speech.
Article 11 is also controversial because it forces online platforms to pay news organisations for the use of their content.
MEPs settled for a version of the directive that compromised on some of the methods news organisations will be able to use to charge web companies for links to content.
The final version clarifies that this will not include the sharing of hyperlinks to content such as news stories.
It also watered down a proposal for upload filters to automatically delete content that violates copyright.
EU commissioners Andrus Ansip and Mariya Gabriel, who proposed the reform, said it was “an essential step to achieving our common objective of modernising the copyright rules in the European Union”.
Phil Sherrell, head of media, entertainment and sports at law firm Bird & Bird said: “Rights holders will be delighted as the directive provides them with additional rights and should strengthen their ability to negotiate royalty payments from online platforms that use their work.”
But, he added: “The devil remains in the detail; the next few months will see the EU Council get the directive into final form for it to be passed into law – potentially before Brexit – and there remain opportunities for those disappointed by today’s vote to try to alter the drafting.”
And Shireen Permohamed, a partner at law firm Harbottle and Lewis said fears that Article 13 would affect the sharing of parodies and net memes were unfounded.
“Although we have not yet seen the agreed text, an EU spokesperson has confirmed that any action taken by online platforms must be designed so that it doesn’t catch legitimate use of content, such as permitted quotations or parodies,” she told the BBC.
Earlier this week, YouTube’s chief business officer Robert Kyncl said that endorsement of Article 13 risked “discouraging or even prohibiting platforms from hosting user-generated content”.
Musician Wyclef Jean also spoke out against the directive, appealing to MEPs before the vote to “embrace and improve the internet, rather than attempt to block and hinder it”.
But many other musicians, including Sir Paul McCartney, had expressed their support for the changes.
Impala, the association for European independent music companies, said after the vote that it was “a great day for Europe’s creators”.
Julia Reda, an MEP who has fought the changes, tweeted her disappointment that the two most controversial parts of the directive had been approved by fellow parliamentarians.