Germany goes to the polls on Sunday in an election that will see Angela Merkel step down after 16 years in power, sparking a knife-edge race to lead Europe's biggest economy.

The first chancellor not to seek re-election since 1949, Ms Merkel's decision to bow out sets the country synonymous with stability on course for change no matter who wins when the final count is in.

Western allies are watching nervously, wary of an uncertain outcome and coalition negotiations that would blunt for weeks, if not months, participation on the international scene by Europe's biggest power of 83 million people.

For Ms Merkel's centre-right CDU-CSU bloc, the stakes could hardly be higher.

Their pick for chancellor, the affable but gaffe-prone Armin Laschet, 60, has seen his popularity dwindle since he was caught chuckling during a tribute to victims of floods in July, the deadliest in Germany for decades.

The conservatives now face the prospect of not just losing the chancellery, but of being booted out of government altogether - unless Mr Laschet can pull off one of his trademark last-minute comebacks.

His main rival is Finance Minister and Vice-Chancellor Olaf Scholz, 63, from the centre-left Social Democrats (SPD), junior partners in three out of four Merkel-led governments.

Often described as capable but boring, Mr Scholz has cast himself as a safe pair of hands and the natural Merkel heir.

The latest opinion polls put Mr Scholz's SPD in the lead with around 25% support, but the gap with the conservatives has narrowed in recent days to just 3%.

Olaf Scholz seen during a campaign rally in Bonn

With just over three days left to win over undecided voters, "it's getting really exciting", said Jan Schaefer, politics editor of Germany's best-selling Bild newspaper.

Polling in third place at around 15% are the centre-left Greens, who are poised to play a key role in post-election coalition haggling.

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

Read More:

Enda Kenny: Merkel can look back at her career with pride
Angela Merkel prepares to bow out amid tributes and ongoing crises

Climate change has emerged as a top voter concern among the 60.4 million people eligible to vote, including about 2.8 million able to do so for the first time.

The Greens' candidate for chancellor, Annalena Baerbock, 40, has warned that the next government "will be the last that can still actively influence the climate crisis".

Huge crowds are set to take to the streets tomorrow for a global climate demo, while young climate activists have been on hunger strike outside the Reichstag parliament in Berlin.

After steering Germany safely through crises such as the 2009-10 eurozone financial crunch and the coronavirus pandemic, Ms Merkel leaves behind an economic powerhouse in relatively robust health.

But critics say years of under-investment in infrastructure and education have left the European Union's most populous country unprepared for a greener and more digital future, while social inequality has worsened.

Mr Scholz and Ms Baerbock have vowed more public investment to help the economy adapt, and higher taxes for top earners.

Mr Laschet says tax hikes could stifle the pandemic rebound and has pledged to cut red tape for businesses.

Although all three candidates are pro-EU, little attention has been paid to foreign policy on the campaign trail, and none of them have Ms Merkel's gravitas on the global stage.

During a farewell visit to her Baltic coast constituency of Stralsund yesterday, Ms Merkel threw Mr Laschet a lifeline by saying he was the right choice to "secure Germany's prosperity" and security.

The still immensely popular chancellor had planned to keep a low profile throughout the campaign, before Mr Laschet's dwindling fortunes forced her to jump into the fray.

"Everyone knows: if Laschet loses, Merkel's legacy is lost too," said conservative newspaper Die Welt.

The unpredictable election is expected to yield a number of coalition options.

In an unusual move, Mr Laschet has already said that even if he comes second, he will try to cobble together an alliance with the Greens and the pro-business FDP.

The Greens have signalled they are more comfortable governing with the SPD.

Should they require a third partner for a parliamentary majority, the far-left Linke could step in but their anti-NATO stance makes them a controversial choice.

None of the parties will partner with the far-right Alternative for Germany (AfD).

Tortuous coalition talks are likely to drag on for weeks, possibly months, keeping Ms Merkel in office a little longer.

The veteran leader has been tight-lipped about what she will do next, but she has said she pictures herself reading and maybe taking "a little nap".