Berlin - Al Maghrib Today
A blueprint for formal negotiations was agreed between Chancellor Angela Merkel's Christian Democrats (CDU) and their former coalition partners, the Social Democrats (SPD).
Politicians stayed up all night to discuss the 28-page document, with the talks lasting more than 24 hours.
But they managed to reach agreement on key sticking points such as migration.
They plan to limit asylum-seeker arrivals to about 200,000 annually. The blueprint also speaks of capping at 1,000 a month the number of migrants who will be allowed to join their family living in Germany.
Stress on 'social cohesion'
Mrs Merkel and SPD leader Martin Schulz told a news conference they were optimistic that a new "grand coalition" could be formed.
They spoke of a "fresh start" for Germany, and Mr Schulz said that in Europe "we are determined to deploy Germany's strength".
Both stressed the need to ensure Germany's "social cohesion", a veiled recognition of voter frustration with centrist politics, amid tensions over the influx of asylum seekers.
The September election saw the far-right Alternative for Germany (AfD) win 94 seats in parliament - a first for post-war Germany.
Both the CDU and SPD suffered their worst election results for more than 50 years.
After a gruelling all-night session - fuelled by currywurst - Angela Merkel appears to have clinched the deal.
The breakthrough is no doubt a relief to the chancellor, who might have faced the prospect of fresh elections had the talks failed. But Mrs Merkel won't be cracking open the Sekt straight away.
These were just exploratory talks, aimed at establishing whether there's a basis upon which a coalition can be formally negotiated. Before the next round of talks can go ahead, the SPD must give the go-ahead at a special party conference.
Bear in mind that many in the SPD - which had originally refused to work with Mrs Merkel again - blame her for their disastrous election result, and are still uncomfortable about another four years in her shadow.
Even if they approve the negotiations, any coalition treaty will be put to the SPD's 400,000 members in a postal ballot. Mrs Merkel is not out of the woods yet.
German official figures show that 280,000 asylum seekers arrived in 2016, a drop of more than 600,000 on the total for 2015. Arrivals fell after EU countries and Turkey tightened border controls.
However, the number of asylum applications continued to rise in 2016. The huge 2015 influx - many of them Syrians, Iraqis and Afghans fleeing war - created a major integration problem for German authorities.
Source: AFP