The Social Democrats, led by the former European Parliament president Martin Schulz, had initially ruled out entering a fresh "grand coalition" with Mrs Merkel's bloc, after both groups lost dozens of seats.
However, Schulz changed course after Merkel failed late past year to form an alternative coalition government with the Liberals and the Greens.
The all-night session confirmed the doubts of leading SPD opponents to another grand coalition, who favour rebuilding their party in opposition.
Martin Schulz, SPD leader, said on Friday that his party's negotiators agreed to recommend to the rank-and-file to back the draft coalition agreement.
The three parties managed to control their differences and reach the compromise.
In their joint blueprint, the parties agreed on key policy outlines - to join European Union partner France in a push to "strengthen and reform" the eurozone, to limit the influx of asylum seekers to Germany to around 200,000 a year, and to refrain from tax hikes given the healthy state of state coffers. Still, Merkel is trying to gain the SPD's support.
The document also specified that the family reunification process should remain suspended until the new regulation is adopted and then restricted to 1,000 people per month.
The increase demanded by the SPD of the top tax rate will not come, as no tax increases is stipulated in the policy paper. As it stands, Germany is a key partner in Europe - more so than the United Kingdom at this point - on a number of issues, ranging from sanctions against Russian Federation to economic ties with Europe.
Four months after Germans went to the polls, the country still doesn't have its new government in place.
Schulz also stressed the importance to the SPD of reaching an agreement for a makeover of the European Union, with his party wanting Berlin to back French President Emmanuel Macron's European Union reform plans.
They stressed the crucial role Franco-German cooperation will play in European integration, saying a renewal of the EU can only succeed if Germany and France "work together with all their strength".
The deal "smells strongly of a continuation of the governing style we know from the last grand coalition, which didn't do much good for society or for the SPD", he said. Frank Baasner, director of Ludwigsburg-based think-tank German-French Institute, told Xinhua.
"Germany has already taken decisions in the right direction - a minimum wage was introduced", said Le Maire, referring to a key condition by the SPD during negotiations for the outgoing coalition with Merkel.
"Time is running out", said Stefan Kornelius, a Merkel biographer. They grew when her first attempt at forging a new government collapsed in November.
Jean-Claude Juncker, European Commission president, hailed the parties' plans for Europe's future as "very significant" and "positive".
"And as far as Europe is concerned, we are convinced that we need a new awakening for Europe", she added.
Laschet, the governor of North Rhine-Westphalia state - a region known for lignite mining - stressed that Germany wants to comply with the 2020 targets set under the global Paris climate agreement.
"Nothing is fixed", said Andreas Scheuer, the general secretary of the Christian Social Union, the Bavaria-only branch of Merkel's Union bloc.
However, the SPD's youth and left-wing factions have renewed calls that the SPD should not enter into another coalition with Merkel, which had made it suffer the landslide loss in federal elections.
Mujtaba Rahman of political consultancy Eurasia assigned a 35 percent probability to coalition negotiations failing and leading to an early election or a minority government. That means Germany is unlikely to have a new government until late March at the earliest.