Frankfurt, Germany - The most likely outcome after Germany's tight election would be a three-way coalition government led either by the centre-left Social Democratic winners or outgoing Chancellor Angela Merkel's conservatives (CDU-CSU), who came second.
In both scenarios, the ecologist Greens and the liberal FDP would play the kingmaker roles -- although they are uneasy bedfellows themselves.
Here's a look at some of the main obstacles on the road to the first post-Merkel government.
Possible coalitions after the German elections
- Climate action -
The centre-left Greens want to accelerate the energy transition and bring about an earlier exit from coal in 2030, eight years before the current end date.
Their "right now" programme calls for big investments in renewable energy to massively boost Germany's production capacities, a broad goal supported by the other parties, but by starkly divergent means.
The conservatives and liberals lay the emphasis on market solutions to climate problems, and would not bring forward the coal deadline. Neither, for that matter, would the SPD.
The Greens have, however, signalled they would be more comfortable governing with the SPD than with the conservatives.
- Debt limit -
Before they can team up, the FDP and Greens would have to confront the controversial question of debt.
The Greens' investment plan "implies big tensions with the FDP, which wants budgetary orthodoxy," says Paul Maurice an expert on German politics from the French Institute of International Relations (IFRI).
The FDP wants to stick to a constitutional debt brake that does not allow deficits to exceed 0.35 percent of gross domestic product, while the Greens want to loosen it to allow 500 billion euros ($585 billion) of extra spending over the next 10 years.
A coalition with the SPD would likely split the difference between the two, but the liberals are natural allies with the conservative bloc, who represent Germany's fiscal rigour.
- Taxing debate -
Without new debts, investment could be financed via new taxes. Both the SPD and Greens want to raise taxes for top earners, while the liberals would rather see them sink.
In particular, the conservatives and liberals support the end of the solidarity tax, which dates back to the reunification of Germany.
The current plan to abolish the tax for all but a few of the highest earners has the support of the SPD and Greens, who would also support the introduction of a wealth tax.
Germany's Social Democrats win election but uncertainty beckons
- New wage thinking -
Raising the minimum wage to 12 euros ($14) is one of the key promises made by SPD Finance Minister and possible future chancellor Olaf Scholz.
When asked which red lines he would set for a coalition with the liberals, Scholz said the increase was "absolutely necessary for the future of Germany".
The Greens would gladly support a rise, while the liberals and the CDU have made it clear that the preference is for wage increases to be agreed between employers and unions, not imposed from Berlin.
- Beyond Germany -
The parties share a commitment to Europe and Germany's international allies, but still have differences in foreign policy that will need to be reconciled.
The FDP will resist any attempt to reform European debt rules that would get more of a hearing from the SPD and Greens.
The Greens, for their part, would like to see Europe's biggest economy take a stronger line with China on human rights, while the other parties would prefer to keep an open dialogue with a crucial commercial partner.
Economic ties play a role in the parties' Russia policy, too. Where the SPD and CDU as the ruling coalition have shepherded the construction of the Nord Stream 2 gas pipeline to Russia, the Greens want to stop it coming online.
By Sebastian Ash