Chancellor Angela Merkel has reached an "in principle" coalition deal four months after she failed to secure a majority in German elections.
The deal with the Social Democrats (SPD) looks set to secure her fourth term as German leader.
Talks between the parties carried on throughout the night with one source telling Reuters this morning: "It is done".
Emerging from the meeting after hours of talks, CSU's Alexander Dobrindt said: "I think it was time to have the prospect of a government in Germany. So it is a good morning."
Senior EU officials welcomed the announcement, with European Commissioner for Economic and Financial Affairs Pierre Moscovici tweeting it was "good news for Europe".
— Pierre Moscovici (@pierremoscovici) February 7, 2018
The deal, between the Christian Democratic Union, Bavaria's sister party the Christian Social Union and the SPD, will help lift uncertainty about Ms Merkel's future but will be subject to the approval of the 464,000 members of the SPD by a postal ballot.
The SPD served as a junior government partner under Ms Merkel from 2013-2017.
According to German public broadcaster ARD, the final disputes centred around "ministry remits and personnel questions".
Days of talks between negotiators had covered everything from foreign policy to labour issues and healthcare. The latest talks lasted 24 hours.
Sources indicate the Social Democrats will get the foreign, labour and finance ministries, a major prize held by Ms Merkel's Christian Democrats for the last eight years.
Olaf Scholz, the SPD mayor of Hamburg, is set to become German Finance Minister.
It may sweeten the deal for the members of the SPD, many of whom are sceptical of the disastrous elections results following four years as a junior partner in the coalition.
The party has enjoyed a new membership surge of more than 24,000, despite the election results.
The SPD tends to favour spending over austerity, so there could be a move away from the firmer fiscal policies of former ministers.
Should the agreement be rejected by SPD party members, Ms Merkel will either have to lead a minority government or call a new election.
An attempt to form a coalition with small parties collapsed in November.
The country has been in limbo since the September 24 election, breaking its record for the longest time between an election and the swearing-in of a new government.
Ms Merkel has been leading a caretaker government since October, which works for day-to-day business but means Germany has not been able to launch major initiatives or play a significant role in the debate on the future of the EU.