German voters chose a new federal parliament, known as the Bundestag, on Sunday, in a nail-biting election that will determine Angela Merkel's successor.
Merkel is stepping down after 16 years in office and three candidates campaigned to fill the chancellor's shoes: Armin Laschet from the centre-right CDU, Olaf Scholz from the centre-left SPD, and Annalena Baerbock from the pro-environment Greens.
Here are five takeaways from the elections:
1. Social Democrats beat Christian Democratic Union, according to preliminary results
The top two German parties were neck-and-neck on election night in the closest German election race since 2005, experts say.
Preliminary results gave the centre-left Social Democrats a narrow win with 25.7% of the vote, while the Christian Democratic Union/Christian Social Union bloc received 24.1%.
This makes it the closest German election since 2005, when the CDU received 35.2% of the vote and the SPD received 34.3% of the vote, Dr Matthias Dilling, a lecturer at the University of Oxford, told Euronews.
But the party that finishes first may not matter since ultimately parties will have to work together to build a coalition.
"Who will end up being the largest parliamentary group (SPD or CDU/CSU) will be important for the general discussion and negotiations [but will not] be constitutionally binding for who will be leading the next government," Dilling told Euronews.
"For example, in 1969, 1976, and 1980, the SPD ended up leading the government despite finishing 2nd. Being able to build a majority coalition will ultimately be more important than finishing first."
2. Merkel's CDU party suffers 'worst result ever'
Angela Merkel's party, the CDU, had been trailing the centre-left SPD in opinion polls since the beginning of August. For weeks, the party's chancellor candidate Armin Laschet had a difficult time charming voters.
According to preliminary results, the CDU's share of the vote is down nearly 8 percentage points compared to 2017, which should see the party lose 49 seats in the Bundestag.
The results show "a massive decline for Armin Laschet’s CDU – their worst result ever," said Rafael Loss at the European Council on Foreign Relations' Berlin office.
"Nevertheless, it will be upon Scholz and Laschet to find common ground with the Greens and the FDP for either a 'traffic-light coalition' with Scholz as chancellor or a 'Jamaica coalition' under Laschet," Loss said.
It means that ultimately, Laschet still has potential ways of becoming the next chancellor.
3. Greens win historic gains and will likely be coalition kingmaker
The Greens had their highest-ever election result in the Bundestag with 14.8% of the vote, a 5.8 percentage point jump on the previous election, making them the third-biggest party in parliament, preliminary results show.
It also means the party will likely be a kingmaker in the next German coalition government.
"We had hoped for more, but it's still a good election result and it gives us a lot of opportunities to be part of the new German government," Greens MEP Rasmus Andresen told Euronews from an election event in Kiel, Germany.
"For us, it's clear that we will just enter in the coalition if a new government would be a climate government. This is what we campaigned for and what our voters are expecting," said Andresen.
The Greens were also likely to come first in the local Berlin elections, exit polls showed.
4. Three-party coalitions could be necessary for governing coalition
No party will have enough seats to have a majority which means that they will need to form a governing coalition.
But any coalition outside of a "grand coalition" of the two main parties would need to be made up of three political parties, exit polls show.
The Social Democrats and the Greens had been hoping to form a coalition government but will not have enough seats to do so.
That means that any coalition with the Greens would have to include the conservative Free Democratic Party (FDP), which has won 11.5% of the vote.
Andresen said the Greens would prefer to be in a coalition with the Social Democrats rather than the Christian Democratic Union, although the FDP would prefer being in a coalition with the CDU.
"From my perspective, we have so much more in common with the Social Democrats and not with the FDP," Andresen said, adding that a coalition is typically based on "a common policy or at least the common understanding of many of those issues, and that's not the case with the FDP," Andresen said.
5. Far-right AfD and far-left Die Linke set to lose seats in parliament
Both the far-right and far-left parties were set to lose seats in Germany's Bundestag, according to preliminary results.
"The three-way race between Olaf Scholz, Armin Laschet and Annalena Baerbock led to a consolidation of the political centre at the expense of the far left and the far-right parties," said Loss.
"Both the AfD and Die Linke are also being plagued by infighting over personnel and programmatic priorities," he added.
The far-right Alternative for Germany (AfD) received 10.3% of the vote, according to early results. That would be down from 12.6% in the previous 2017 elections when the party was the third-largest in Germany.
Loss said it showed that "worryingly, there is a segment of the German population who now openly supports extreme-right politics – a majority even in some eastern states."
The far-left party, Die Linke, meanwhile, slipped below 5% of the vote, a huge decline from their 9% share of the vote in the 2017 election.
It means that Die Linke doesn't have enough seats to give the Social Democrats and Greens a majority so SPD candidate Olaf Scholz will have to rely on the Free Democratic Party (FDP) if he wants to lead the next German government.
This article has been updated with the preliminary results from the election.