Merkel's conservative Christian Democrats and the Social Democrats of outgoing German leader Gerhard Schröder -- traditionally bitter rivals -- wrapped up a manifesto of more 130 pages for a four-year term in government.
"I am pleased to tell you that the pact for the second grand coalition at federal level in the history of the federal republic of Germany is finished," a smiling Merkel told reporters.
It ensures Merkel will become Germany's first female chancellor, and comes just ahead of a self-imposed Saturday deadline.
Outgoing SPD leader Franz Müntefering acknowledged that the odds had been against a government straddling the political divide or a so-called "grand coalition", last seen in Germany in the 1960s.
"None of us was prepared for a grand coalition -- none of you
either," he told the joint news conference. "We learned to make compromises."
Germany has been locked in political limbo since an inconclusive September 18 election which forced the Christian Democrats, who managed a narrow victory, to open coalition talks with the Social Democrats.
Friday's deal is the product of last-minute horse-trading on contentious issues such as new taxation and the future of the country's nuclear power plants.
New faces, old challenges
The pact seeks to tackle the daunting problems facing the ailing economy, including measures to close a record to close a record 35-billion-euro ($41-billion) gap in the public deficit and bring down the 11-percent jobless rate.
Merkel and incoming SPD chairman Matthias Platzeck, an ambitious state leader, are both from the former communist east and mark the first time that easterners are at the helm of German politics.
Franz Müntefering, who will be vice-chancellor and labor minister, will hand over the SPD reins to Platzeck at a party congress next week, where delegates must also sign off on the government manifesto.
The Christian Democrats and their Bavarian sister party, the Christian Social Union, are to approve the pact at separate congresses Monday.
The way will then be clear for Merkel to be voted in November 22, six months after Schröder said he would seek new elections to win a fresh mandate for his much-maligned economic reform drive.
The nuts and bolts
The parties agreed in their program to raise the main value-added tax rate by three points to 19 percent from 2007, an unpopular measure whose revenue will be used to plug the budget and lower non-wage labor costs to promote hiring.
The retirement age will gradually be raised to 67 from 65.
In a largely symbolic move aimed at promoting "social justice", the Social Democrats also managed to box through an income tax surplus, a so-called "rich tax" for high earners (more than 250,000 euros a year) in the face of strong conservative opposition.
Compromise and continuation
One crucial area where the new government will continue the legacy of its predecessor is nuclear energy.
Schröder's government had committed itself to gradually phasing out nuclear power, a point that most conservatives opposed tooth and nail. The issue was set to be one of the most serious stumbling blocks in coalition negotiations between the two sides. But Merkel's new government, in a sign of compromise, now says it will continue on the same course and shut down all of the country's nuclear power plants over the next two decades.
On foreign policy, the incoming government will seek improved relations with the United States -- strained over German opposition to the Iraq war
and strengthen ties with European Union partners.
The parties also accepted a compromise formulation on Turkey's bid to join the European Union.