Two months after Merkel's landslide election victory and a month after negotiations began, Germany's two biggest political forces clinched a deal at about 5 a.m. (0400 GMT) that both sides said they could live with.
"The result is good for our country and has a conservative imprint," said Hermann Groehe, secretary general of Merkel's Christian Democrats (CDU). "No new taxes and no new debts."
Martin Schulz, president of the European Parliament and a senior SPD negotiator, called it an "excellent result" for his party, whose participation in a Merkel government still depends, however, on a ballot among 474,000 card-carrying SPD members.
That adds uncertainty to a process that has dragged on for months, preventing Germany's European partners from pushing ahead with major reforms like a banking union. But the likely outcome remains continuity under the popular chancellor.
Party leaders should present details of the deal at a news conference on Wednesday but may wait to announce the allocation of cabinet posts. Merkel left the SPD headquarters, where the final round of talks took place, without a word to the media.
But details of policy compromises emerging in recent days show she has leveraged her landslide victory in September's vote to ensure her pragmatic brand of conservativism continues to dominate Europe's largest economy.
Her CDU and their Bavaria sister party, the Christian Social Union (CSU) thrashed the SPD but failed to win a parliamentary majority, forcing Merkel to seek a partner.
She has made concessions to the SPD on the economy, agreeing to a minimum wage of 8.50 per hour, tighter rules for employers and pension hikes, despite howls of protest from business. Just before dawn, the bargaining stalled on how to fund this without Merkel breaking a campaign promise not increase taxes or debt.
Polls suggest most people trust 59-year-old Merkel not to endanger an employment rate which is the envy of Europe. She is also trusted on the euro crisis, where she has demanded fiscal reforms from the likes of Greece in return for bailouts.
Carsten Nickel, a political analyst at Teneo Intelligence, said the SPD had realised, after flirting with the idea of common euro-zone bonds, "that the domestic political consensus does not reward any large-scale deviation form Merkel's path".
Banks to Beethoven
Wolfgang Schaeuble, Merkel's trusted 71-year-old finance minister, should get to keep his job.
Frank-Walter Steinmeier of the SPD may be foreign minister again, as in the last Merkel-led coalition of 2005-2009. SPD chairman Sigmar Gabriel, who was in that cabinet too, could get a beefed-up economy ministry or lead the SPD in the Bundestag lower house.
The last "grand coalition" suited Merkel but prompted SPD left-wingers, already bitter about labour reforms launched by the last SPD chancellor, Gerhard Schroeder, to leave in droves.
Some of those reforms are now being watered down but the members' ballot is still risky and a "no" vote could mean a new German election and a coalition between Merkel and the Greens.
The SPD insisted Merkel wait until after the vote to name her cabinet, to avoid giving supporters the impression that the likes of Gabriel put their own ambitions above party values.
With the talks ending on the November 27 deadline set by Merkel, SPD leaders must now persuade members at over 30 rallies that a minimum wage is a victory for the working class.
"We will convince members," Steinmeier told reporters.
The ballot results are due on December 14. At an SPD congress in Leipzig, delegates said they would only decide after reading the coalition document. Over 170 pages long, it shows a very German attention to detail, ranging from banking rules to plans for the 250th anniversary of Beethoven's birth in 2020.
If the majority are willing to overlook details like the SPD conceding on such a major campaign platform as tax hikes for the rich, and okay Germany's third "grand coalition" of the post-war era, Merkel can be sworn in the week before Christmas.
© Thomson Reuters 2013