A man speaks on his phone in Copenhagen. The European Union has agreed to end mobile roaming charges within two years.
Photograph: Virginia Mayo/AP

Holidaymakers travelling within the EU will pay the same price to use their mobile phone as they would at home from June 2017, after a deal was reached by European authorities.

The scrapping of roaming charges has been fiercely resisted by the mobile industry but the agreement on Tuesday comes with a carrot for the telecoms firms – a parallel deal on internet neutrality that would allow them to charge some service providers for faster connections to their customers.

It means companies could potentially pay for priority over rivals under sweeping new internet laws for Europe, which are due to come into force next spring after a period of consultation.

It opens the way for companies such as Google, Facebook and Netflix to pay to have better connections than smaller competitors. It will also facilitate new services such as self-driving cars or health monitoring that depend on completely secure connections.

Campaigners welcomed fairer pricing for consumers but raised concerns about the net neutrality laws, with one group describing them as “blurry, ambiguous” and “an abdication of responsibility”.

The agreement, which would overhaul and centralise the way telecoms are regulated in Europe, was reached at 2am after late-night talks between the European commission, members of the European parliament and national ministers. It follows two years of negotiations and U-turns during which the European parliament locked horns with EU governments concerned at the financial impact on their national telecoms groups.

Plans to scrap roaming had been scheduled for the end of 2015, but were blocked in March by the European council, whose members are the ministers of national governments.

The commission is hailing an end to “huge telephone bills ruining your holiday budget”. This year, mobile operators can still charge travellers to European members states up to 19 cents (14p) a minute for outgoing calls, 5 cents for incoming calls, 6 cents per text message, and 20 cents per megabyte of data downloaded, on top of their normal tariff.

Net neutrality: what is it and why does it matter?

Read more

From April 2016, in an interim phase, fees will be capped at 5 cents per minute for calls, 2 cents per text and 5 cents per megabyte of data. In June 2017, the surcharges will be scrapped.

The Liberal Democrat MEP Catherine Bearder said: “Finally the end of rip-off roaming charges in Europe is firmly in sight. From Riga to Rome, two years from now holidaymakers will be free to use their phones freely wherever they are in the EU. This shows how being in the EU means we can deliver a fairer, cheaper deal for British consumers.”

Ernest Doku, telecoms expert at the price comparison site uSwitch.com, said he hoped there would be no more U-turns: “Mid 2017 is a long way off, particularly when a fifth of UK holidaymakers have returned home from an EU trip in the past year to find their bill was, on average, £61 higher than usual,” he said. “Let’s hope there’ll be no more backtracking after Europe’s mobile networks have had their say.”

The new rules on prioritising internet traffic – both over fixed-line broadband and mobile phones – lay the foundation for service providers to be able to pay for more reliable connections. Brussels claims its proposals, which are due to come into law in member states from 30 April 2016, will protect net neutrality by ensuring consumers can access any service online.

Traffic would not be “unfairly” blocked or slowed down, the commission announced, and access to a startup, a charity or public service website would not be slowed down to benefit bigger companies.

All traffic would be treated equally “subject to strict and clearly identified public-interest exceptions”, such as network security or combating child pornography, and also the need for providers to manage peaks and troughs in usage.

However, in parallel, broadband companies will be able to charge for higher quality, dedicated connections for services such as video streaming or “innovative” applications so long as the rest of the internet is not compromised.

“What is the point of agreeing to adopt legislation that makes the legal situation less clear than it was before?” said Joe McNamee, executive director of the campaign group European Digital Rights. “Now we have text which could mean almost anything – we did not need more legal uncertainty.”

Those companies allowed to pay to use the internet fast lane will only be able to do so if a better connection is deemed “necessary” for their service, according to the draft law. But the definition of necessary is too broad, said McNamee. Europe was leaving the job of giving meaning to the new laws to the courts and national regulators, he claimed.