The decision to pull Britain out of the Interrail scheme has been reversed after a public outcry.
It comes a day after the Rail Delivery Group (RDG) said UK train companies would stop accepting Interrail and Eurail passes from 2020.
RDG said it had renewed talks with Eurail Group, the company running the programmes, after “strong reaction to news of our departure”.
“Britain’s train companies never wanted to leave Interrail,” it said in a statement.
“We are pleased to be able to tell passengers that we have reached agreement and will be remaining part of both the Interrail and Eurail passes.”
Interrail passes mean holidaymakers can travel across Europe by train on a single ticket.
The current Interrail pass offers a number of options, including two months’ unlimited travel for £460.
Interrail passes are for European citizens, while the Eurail passes are for tourists from the rest of the world.
Eurail Group ended Britain’s membership of both schemes after UK train operators decided to stop selling Eurail passes in favour of the BritRail pass.
Transport Secretary Grant Shapps had said the ending of Britain’s membership was “counterproductive” and urged the RDG to backtrack.
He wrote on Twitter: “Despite this not being related to leaving the EU and even though it doesn’t primarily impact on UK citizens, it will make it harder for everyone else to explore the UK.
“A COUNTERPRODUCTIVE move in my view and I’m therefore calling on the Rail Delivery Group to reverse their decision!”