The European Union has officially approved a controversial and sweeping reform of its copyright rules to protect content creators but that includes provisions critics and tech giants have argued will significantly reduce free speech online.

The rules were passed by the European Parliament last month, but still needed the final approval of member governments to go into effect. Opponents were hoping to make one last stand against the legislation, but instead 19 of the 28 member countries voted in favor of the overhaul.

“With today’s agreement, we are making copyright rules fit for the digital age,” said European Commission President Jean-Claude Juncker in a statement. “Europe will now have clear rules that guarantee fair remuneration for creators, strong rights for users and responsibility for platforms. When it comes to completing Europe’s digital single market, the copyright reform is the missing piece of the puzzle.”

The Directive on Copyright in the Digital Single Market — or the EU Copyright Directive — has been debated for several years. But it’s been controversial primarily because of two elements that caused the internet to freak out.

The first is Article 11, which requires websites to pay publishers a fee if they display excerpts of copyrighted content — or even link to it — creating the so-called “link tax.” The second is Article 13, the “upload filter,” which makes digital platforms legally liable for any copyright infringements on their platform.

Critics have said smaller competitors won’t be able to afford the compliance costs, and larger platforms will likely take an overly cautious approach that limits the ability to post and share content.

But creators and artists have been pushing hard for the reforms because they say platforms such as Google and Facebook have leveraged their works to build an online advertising duopoly while paying them next to nothing in return.

Despite intense lobbying from opponents, the European Parliament voted 348 to 274 vote in favor of the new directive. Today, the 19 countries voting in favor of the reform included France and Germany, while Finland, Italy, Luxembourg, the Netherlands, Poland, and Sweden voted against.

Of course, this being the EU, such directives move at the speed of sludge. Sometime later this year, the new copyright rules will be officially published in the Official Journal of the EU.

From there, member states have 24 months to take that directive and turn it into national legislation. As the details move to national assemblies, it’s likely opponents will launch new efforts to influence the final adoption.