Germany's Social Democrats came first by a narrow margin in today's national election, projected results showed, putting them in pole position to lead a government for the first time since 2005 and to end 16 years of conservative-led rule under Angela Merkel.
Two men are jostling for Ms Merkel's job - Finance Minister and Vice Chancellor Olaf Scholz of the SPD, and Armin Laschet of the CDU-CSU.
The centre-left Social Democrats (SPD) were on track for 25.5% of the vote, ahead of 24.5% for Ms Merkel's CDU/CSU conservative bloc, projections for broadcaster ARD showed, but both groups believed they could lead the next government.
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
The tight result, which saw the CDU/CSU slump to a post-war low for a federal election, means lengthy coalition talks will follow before a new government takes office, likely involving the Greens and the liberal Free Democrats (FDP).
"This is going to be a long election evening, that is certain," the Social Democrats' chancellor candidate, Olaf Scholz told jubilant supporters.
"But it is also certain that many put their cross by the SPD because they want the next chancellor of Germany to be called Olaf Scholz," he added.
Mr Scholz, 63, would become the fourth post-war SPD chancellor after Willy Brandt, Helmut Schmidt and Gerhard Schroeder. Finance minister in Ms Merkel's awkward ruling "grand coalition", he is a former mayor of Hamburg, where Ms Merkel and Mr Schmidt were both born.
Mr Scholz's main rival, conservative chancellor candidate Armin Laschet, said the election was "a neck and neck" race and signalled the conservatives were not ready yet to concede.
"We have no clear final result, no certain numbers... We will do everything to form a conservative-led government, because Germany needs a future-oriented coalition that modernises our country," Mr Laschet, 60, told subdued supporters.
Attention will now shift to informal discussions followed by more formal coalition negotiations which could take months, leaving Ms Merkel in charge in a caretaker role.
"This will be all about striking deals among multiple players, and several options seem possible," said Carsten Nickelat Teneo, a political risk consultancy. "The talks could take some time."
Ms Merkel plans to step down after the election, making the vote an era-changing event to set the future course of Europe's largest economy.
She has stood large on the European stage almost since taking office in 2005 - when George W. Bush was US president, Jacques Chirac in the Elysee Palace in Paris and Tony Blair British prime minister.
"This has been a once-in-a-generation election," said senior Greens politician Katrin Goering-Eckardt.
After a domestic-focused election campaign, Berlin's allies in Europe and beyond may have to wait for months before they can see whether the new German government is ready to engage on foreign issues to the extent they would like.
A row between Washington and Paris over a deal for Australia to buy US instead of French submarines has put Germany in an awkward spot between allies, but also gives Berlin the chance to help heal relations and rethink their common stance on China.
On economic policy, French President Emmanuel Macron is eager to forge a common European fiscal policy, which the Greens support but the CDU/CSU and FDP reject. The Greens also want "a massive expansion offensive for renewables".
Whatever coalition formation ends up in power, Germany's friends can at least take heart from an election campaign in which moderate centrism prevailed, and the populism that has taken hold in other European countries failed to break through.
The projected results for ARD showed the far-right Alternative for Germany (AfD) on track for 10.9%, worse than four years ago when they stormed into the national parliament with 12.6% of the vote, and all mainstream groupings have ruled out a coalition with the party.