Angela Merkel’s conservatives (CDU/CSU) have finally hashed out a coalition deal with the centre-left Social Democrats (SPD) that could break months of political deadlock in Germany.
Negotiators have agreed on the division of key ministries – one of the last hurdles towards forming a government.
It could end more than four months of wrangling since inconclusive elections in September.
But the deal will still need to be approved by SPD members.
Many in the party fear that re-entering a coalition with CDU/CSU could damage it in the long term.
In a joint news conference on Wednesday, Chancellor Merkel said the agreement gave the basis for a “good and stable government”.
SPD leader Martin Schulz thanked the conservatives for making what he said were tough compromises.
What has been agreed?
The SPD looks set to control six ministries, including finance and foreign affairs.
German media say Mr Schulz, a former president of the European Parliament, is hoping to get the job of foreign minister.
But the whole agreement still needs the approval of the SPD’s 460,000 members, who will have the final say in a postal vote due in the coming weeks.
Those opposed to any deal with Mrs Merkel include a new group within the SPD calling itself NoGroKo (no grand coalition).
Why has this taken so long?
Mr Schulz at first ruled out going back into government with Mrs Merkel’s centre-right CDU and its Bavarian sister party, the CSU.
The parties had seen their popularity drop after being in coalition on and off since 2005.
He changed his mind when CDU/CSU coalition talks with the liberal Free Democrats (FDP) and Greens broke down.
Both Mr Schulz and Mrs Merkel have been under pressure to see off a challenge by the far-right Alternative for Germany (AfD), which became the third biggest party in September’s election.
Other than distributing ministries, there have been big stumbling blocks in the coalition talks over workers’ rights and healthcare.
Immigration, Europe, and tax, have also been points of contention.
Why does Germany’s government matter?
By Damien McGuinness, BBC News, Berlin
Handing Germany’s centre-left control of finance, foreign and labour policy would have a big impact on the rest of the world, particularly Europe.
A Social Democrat finance ministry – replacing pro-austerity Wolfgang Schäuble – is more likely to go along with French President Macron’s ambitious plans for EU reform, by allowing more German support for struggling eurozone economies.
And at home these powerful ministries would help the SPD push for key left-wing policies, such as better rights for employees.
All of this could go down well with SPD party members, who will vote on any final coalition deal.
An agreement which looks like a win for the SPD will increase the likelihood that they will vote yes.
But if they vote no, then the most likely outcome could be fresh elections.
What has the reaction been?
European Union allies, such as France, see Germany as a pillar of stability in the bloc and have been hoping Mrs Merkel succeeds.
Top EU officials, including the Economics Commissioner Pierre Moscovici, welcomed the breakthrough on Wednesday.