Two million German public-sector workers will get a pay rise of 6.3 percent over a 24-month period, according to the government official leading the talks, ending a labor dispute that disrupted services across Germany in recent weeks.

Interior Minister Hans-Peter Friedrich, who had led the negotiations with the Verdi union on behalf of the government, announced the breakthrough shortly before 7 a.m. (1 a.m. EDT) on Saturday after all-night negotiations in Potsdam, a suburb of Berlin.

This wasn't a marathon, this was an Ironman (triathlon), Friedrich told reporters at dawn on Saturday at the end of the final round of talks that started on Friday. He said employers had gone to the outer limit of what was acceptable.

Verdi leader Frank Bsirske said it was difficult to accept the deal but at least the union had managed to narrow the gap to the pay rises workers in the private sector have been receiving. The annual inflation rate in Germany is about 2 percent.

Verdi, one of Germany's biggest and most influential unions representing 2 million public-sector workers, had been seeking a 6.5 percent rise for one year after years of accepting modest pay deals. Verdi rejected an earlier offer of a 3.3 percent rise, staggered over two years.

Wage rises in many other euro zone countries have been steeper than in Germany, fuelling the economic divergence that has underpinned the debt crisis in the single-currency area.

The deal ends the threat of a broader walkout following a series of recent warning strikes that have disrupted Europe's largest economy.

Overall, wages for some 9 million German workers are up for negotiation this year and the public sector deal will likely serve as a model for other unions.

With Germany's economy growing strongly, higher-than-expected tax revenues gave the federal government and local communities more scope for pay rises. The union had pointed that out in the course of 55 hours of talks in recent weeks and argued they accepted modest pay deals in leaner past years.

Under the deal, public-sector workers will receive a 3.5 percent pay rise retroactive to March 1. They will receive a further 1.4 percent in January 2013 and another 1.4 percent pay rise in August 2013.

Late on Friday evening, employers had signaled a pay rise of up to 5.8 percent over two years was possible before they upped their effort to 6.3 percent. One last sticking point was the employers wanted the deal to start April 1 rather than March 1. The union rejected that demand.

(Reporting By Axel Hildebrand; Writing by Erik Kirschbaum; Editing by Michael Roddy)