MEPs have voted in favour of controversial changes to online copyright across the EU, in a decision designed to make tech giants more responsible for paying creatives, musicians and news outlets more fairly for their work online.

The Copyright Directive was approved by 348 MEPs, with 274 voting against and 36 abstaining.

EU member states will have two years to implement the reforms, although it is not clear what it would mean for the UK in the face of Brexit uncertainty.

“A huge thank you to all the MEPs who supported the Copyright Directive today and the fantastic work of all those who have campaigned so hard on this,” representation body UK Music tweeted.

Julia Reda, a German MEP and vocal opponent of the move, described the decision as a “dark day for internet freedom”.

MEPs also rejected making any individual amendments to the reforms, but only by a slim majority of five votes.

Supporters in the creative, music and journalism industries have long argued that the Copyright Directive will enable content-makers to be fairly paid for their work, while opponents, including the tech giants themselves, fear the changes will have an impact on freedom of speech and expression online.

Two parts, Article 11 and Article 13, have been the most contentious since talks started, with the likes of YouTube warning that viewers across the EU could be cut off from videos.

“The EU Copyright Directive is improved but will still lead to legal uncertainty and will hurt Europe’s creative and digital economies,” a spokesman from Google-owned YouTube said.

“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.”

Musicians Sir Paul McCartney and Debbie Harry were among the most vocal supporters of the changes, alongside a number of groups including the European Alliance of News Agencies, which argued that it provides an opportunity to further develop quality news services and enables it to compete more fairly with tech giants.

Alexandru Giboi, secretary general of the EANA, said: “Creators of content have a much better chance of obtaining a fair remuneration for their work, and European citizens have also a much better chance of accessing quality content online.

“In consequence, the new copyright legislation will prove to be a win-win solution for both the trustworthy, quality media and the public.

“The inclusion of news agencies in the text of the directive can also be interpreted as a recognition of the quality of our work, and of the importance that news agency journalism has, especially for safeguarding European media as a whole, as European news agencies are the main providers of quality news to most of the other media organisations in Europe.”