Germany’s two main parties are neck and neck after Sunday’s election, according to first exit polls from voting to determine who will succeed Angela Merkel as leader of Europe’s largest economy.

An exit poll from public broadcaster ARD put both the left-of-centre Social Democrats and the centre-right CDU/CSU on 25 per cent, with the Greens on 15 per cent and liberal Free Democrats (FDP) on 11 per cent.

However another exit poll from broadcaster ZDF put the Social Democrats ahead on 26 per cent, the CDU/CSU on 24 per cent, the Greens on 14.5 per cent and the FDP on 12 per cent.

The preliminary results suggest Germany is set for a three-way coalition, the first in its recent history. That will entail weeks and possibly months of wrangling as the parties overcome their many differences to stitch together a viable government.

However, it is still unclear what form the coalition will take, and whether Germany’s next government will be led by the SPD, and its chancellor candidate Olaf Scholz, the current finance minister, or the CDU/CSU of Armin Laschet.

“It is a photo-finish,” said Markus Blume, general secretary of the CSU, the Bavarian sister party of Laschet’s CDU.

Sunday’s election was the first in Germany’s postwar history when an incumbent chancellor did not stand for re-election, a factor that made the race one of the most volatile and unpredictable in living memory. All of the main parties — SPD, CDU/CSU and Greens — have seen ten-point swings in their poll ratings since the start of the year.

Merkel’s departure from power meant the millions of voters who had voted for her in past elections but had no strong allegiance to the CDU/CSU were up for grabs.

“This is a neck and neck race and will be a long election night. At the moment, we cannot say who will win,” CDU general secretary Paul Ziemiak told ARD minutes after the exit poll was published, adding that the decisive question will be who can form a government.

Additional reporting by Olaf Storbeck in Frankfurt