“We've made it,” Manfred Schnell, head of the train drivers' trade union GDL, told a news conference late on Sunday in Berlin.
Delays are still likely for commuters and long-distance travelers, as Deutsche Bahn already put plans in place for reduced train traffic on Monday due to the anticipated strike.
Deutsche Bahn and GDL have been involved in a standoff since last year. Drivers staged several limited strikes before the two sides announced in late January that they had reached an agreement that included an 11 percent pay rise for the drivers.
But the accord was never finalized, with GDL saying the railway reneged on a deal reached to give it a special contract independent of other railway unions. Deutsche Bahn wanted to link GDL's contract with contracts for its other two unions, Transnet and GDBA.
Bahn chief Hartmut Mehdorn said his company had reached consensus with all three unions involved in the dispute. GDL will retain an independent contract but will be required to consult with the other two unions.