Leaders of German Chancellor Angela Merkel's conservative Union bloc and the centre-left Social Democrats have agreed on the basis to move ahead with coalition negotiations, after marathon overnight talks.
Mra Merkel's Christian Democratic Union, the Bavarian-only Christian Social Union and the Social Democrats produced a 28-page document outlining their compromise positions on a wide range of issues, including taxes, migration and healthcare.
"Many, many hours of work, serious wrangling and shaping are contained in these 28 pages," tweeted CDU politician Julia Kloeckner, part of Mrs Merkel's negotiating team, on Friday morning.
Social Democrat spokesman Serkan Agci told reporters outside his party's headquarters in Berlin, where the talks took place, that there had been a "breakthrough" agreed upon by the party leaders but said final revisions were still being made on the document by negotiating teams, which would also need approval.
The final negotiating session between the sides began on Thursday morning and participants, who had already worked all week, worked through the night to come to the agreement.
Despite the agreement, the possibility of a new coalition of Mrs Merkel's bloc with the Social Democrats, as governed Germany in the outgoing government, is still far from a done deal.
Among other things, the Social Democrats' leaders will still have to sell entering coalition talks to a party conference, and face much resistance. The sides then need to thrash out the actual coalition agreement, which would have to be approved in a ballot of the Social Democrats' entire membership.
Nevertheless, had this week's talks failed, Mrs Merkel's only options would have been to form a minority government or hold new elections.
Following a dismal result in Germany's election on September 24, the Social Democrats initially vowed not to enter into another government with Mrs Merkel's conservatives, but reconsidered their position after the long-time chancellor's attempts to form a coalition with two smaller parties collapsed.
German President Frank-Walter Steinmeier appealed to the negotiators on Thursday to consider their responsibility towards Europe, not just their own parties and political futures.