A controversial directive introducing sweeping changes to copyright enforcement across Europe has been approved by the European parliament, despite ferocious campaigning led by Google and internet freedom activists.

The European copyright directive, voted in by 348 MEPs to 274 against, is best known for two provisions it contains: articles 11 and 13, referred to as the “link tax” and “upload filter”, respectively, by opponents. (Confusingly, a last-minute redraft means that the actual clauses are now articles 15 and 17, even as the older names have stuck)

The latter has been the main focus of campaigning. It requires websites that host user-generated content to take active measures to prevent copyrighted material from being uploaded without permission, under the penalty of being held liable for their users’ copyright infringement.

Article 11, the “link tax”, includes new requirements aimed at making companies like Google pay licensing fees to publications such as newspapers whose work gets aggregated in services like Google News.

Supporters say it prevents multinational companies from freeloading on the work of others without paying for it, but critics argue that it effectively imposes a requirement for paying a fee to link to a website.

Publishers and artists have pushed for the clauses, arguing that they would put an end to widespread infringement on sites such as YouTube and Instagram, while companies including Google and Amazon have attacked the measure as unworkable in practice, and overbearing to the extent that it may force them to close services in Europe.

Article 13 has taken on a particular infamy thanks to the ways those companies have mobilised their user base on popular social sites such as Google’s YouTube and Amazon’s Twitch. Popular YouTubers including Philip DeFranco and FBE have run videos attacking the directive, as have Twitch streamers. The Amazon subsidiary even put together a livestream featuring European legislators playing Mario Kart as they talked about the harm the legislation could do.

The campaigning reached such a level that many younger social media users ended up believing the internet would be deleted in Europe the day the legislation passed, posting heartfelt messages on Instagram wishing goodbye to their online friends.

In a statement, a Google spokesperson told the Guardian: “The EU copyright directive is improved but will still lead to legal uncertainty and will hurt Europe’s creative and digital economies. The details matter, and we look forward to working with policymakers, publishers, creators and rights holders as EU member states move to implement these new rules.”

Catherine Stihler, the chief executive of the Open Knowledge International, a not-for-profit organisation which pushes for open data, said the vote was “a massive blow for every internet user in Europe. MEPs have rejected pleas from millions of EU citizens to save the internet, and chose instead to restrict freedom of speech and expression online. We now risk the creation of a more closed society at the very time we should be using digital advances to build a more open world where knowledge creates power for the many, not the few.”

But legal experts argue that the directive is hard to read as requiring the sort of drastic action that technology firms fear. Kathy Berry, senior lawyer at Linklaters, says that “while article 13 may have noble aims, in its current form it functions as little more than a set of ideals, with very little guidance on exactly which service providers will be caught by it or what steps will be sufficient to comply.”

More generally, Berry says, there are several further steps before article 13 becomes law. “It also needs to be approved by the European council. The council’s vote is scheduled for 8 or 15 April. Assuming it passes that stage, the directive will be signed by council and parliament before being published in the EU’s Official Journal, and will enter into force 20 days after that.” Even then, EU member states have a further two years to implement the directive into their own laws, which may mean that the UK is no longer in the EU at that point.

“However, UK businesses providing their services in the EU will still have to comply.”