But fresh trouble appeared to be brewing for Deutsche Bahn elsewhere as the biggest rail union threatened industrial action if a pay deal was not reached soon.
At least for now, though, Deutsche Bahn said that "millions of rail passengers can breathe a sigh of relief".
"The GdL (train driver union) strike is over with immediate effect," it said in a statement, adding that the company and the union had agreed overnight to have a mediator appointed to settle their months-long dispute over wages, work hours and negotiating rights.
DB said it was "pulling out all the stops" for services to return to normal as soon as possible.
It would be able to announce at around midday when normal services could resume, it said.
The group's head of personnel Ulrich Weber said: "We're very relieved. Our customers and employees can breathe easier. Mediation, rather than strike, is what is called for now. Calm needs to be restored."
GdL, for its part, said its members would return to work at 7:00 pm (1700 GMT).
GdL said management had conceded to one of its key demands, namely that a deal would not be dependent on whatever agreements were reached with other unions.
The GdL, which represents some 20,000 train drivers, is demanding a wage rise and shorter work hours as well as the right to represent other rail workers such as conductors and restaurant carriage staff.
That demand is effectively a turf war with the larger railway union EVG, which has more than 200,000 members, and which is now involved in separate, less heated, wage negotiations with DB.
- Gordian knot -
"After nearly a year of this industrial dispute, we've managed to cut through the Gordian knot," said GdL chief Claus Weselsky.
And the union promised there would be no more strikes until at least June 15 while the mediation was ongoing.
The strike, the ninth stoppage in less than a year, had begun Tuesday and initially affected freight trains, but was extended to passenger services on Wednesday, forcing the cancellation of two thirds of long-distance passenger services.
The industrial dispute centres on wages, work hours and negotiating rights between the small GdL union and the national rail operator.
In early May the union staged a nearly week-long walkout, the longest in DB's history, which industry groups estimated cost Europe's top economy almost half a billion euros ($550 million).
Nevertheless, while GdL and management have agreed to lower their weapons, new trouble appeared to be brewing with EVG, which is threatening walkouts of its own.
"We will have to strike if no deal is reached on Thursday," EVG chief Alexander Kirchner told the regional daily Passauer Neue Presse.
Kirchner insisted that EVG was anxious to reach a deal at the negotiating table.
"But if that's not possible, we will take industrial action," he said, adding that management's offer of a 4.7-percent pay increase was "a long way off what would would be acceptable for us."
Kirchner also hit out at the smaller drivers' union GdL for striking.
"Only around 1,000 train drivers are striking, while more than 100,000 colleagues are keen to work," he said. "It is not acceptable if 1.5 percent of the workforce and their strike action prevent the others from getting more money."
Deutsche Bahn transports around 5.5 million passengers and over 600,000 tonnes of cargo in Germany every day.