Both the SPD and the Union bloc are hoping to get into a coalition with the Greens and Free Democrats.
The centre-left Social Democrats are hoping to govern Germany after narrowly beating Angela Merkel's centre-right Union bloc in Sunday's parliamentary election.
The SPD, led by Olaf Scholz, secured 25.7% of the vote, while the CDU-CSU bloc, helmed by Armin Laschet, got 24.1%, according to preliminary figures.
This translates into 206 seats for the SPD in the federal parliament, also known as the Bundestag, and requires the party to enter into coalition talks to secure the 162 seats it needs to get a majority.
The process is expected to take weeks or even months with outgoing chancellor Angela Merkel to remain at the helm of the country in a caretaker majority until a power-sharing deal is struck.
Scholz, who said the vote gave his party "a very clear mandate to ensure now that we put together a good pragmatic government for Germany,", will be hoping to strike what has been referred to "traffic light" coalition with the Greens and the pro-business liberal Free Democrats (FDP).
“Voters have spoken very clearly,” Scholz said Monday. “They strengthened three parties — the Social Democrats, the Greens and the Free Democrats — so this is the visible mandate the citizens of this country have given: These three parties should lead the next government.”
Christian Lindner, leader of the Free Democratic Party (FDP), said his party would first enter coalition negotiations with the Greens before speaking to either of the two larger parties.
He said this made sense given that his party, which came fourth in Sunday's elections with 11.5% of the vote - and the Greens - both sought "a change away from the status quo."
The Greens secured their best score ever in a federal election, coming in third with 14.5% of the vote. That gives them 118 seats in the Bundestag. The FDP came behind them with 11.5% of ballots to take 92 seats.
Relive the entire nail-biting night through our live blog here.
Scholz and Laschet to compete for Greens, FDP
But, despite getting its worst-ever result in a federal contest, the Union bloc said it too would reach out to smaller parties to discuss forming a government.
Laschet, the governor of North Rhine-Westphalia state who outmanoeuvred a more popular rival to secure the nomination of Merkel’s Union bloc, had struggled to motivate the party’s base and suffered a series of missteps.
“Of course, this is a loss of votes that isn't pretty,” Laschet said of results that looked set to undercut by some measure the Union's previous worst showing of 31% in 1949. But he added that with Merkel departing after 16 years in power, “no one had an incumbent bonus in this election.”
Laschet told supporters that “we will do everything we can to form a government under the Union’s leadership, because Germany now needs a coalition for the future that modernises our country."
Laschet, whose union bloc got 196 seats, will be courting the same parties as Scholz, although the Greens have expressed a preference for the SPD.
Voters also seem to favour Scholz's traffic light coalition, according to a YouGov poll released during the night. And 43% believe that Scholz, the country's current finance minister, should become the next chancellor of Europe's largest economy.
The other option is a repeat of the outgoing “grand coalition” of the Union and Social Democrats that has run Germany for 12 of Merkel's 16 years in power, but there was little obvious appetite for that after years of government squabbling.
“Everyone thinks that ... this ‘grand coalition’ isn't promising for the future, regardless of who is No. 1 and No. 2,” Laschet said. “We need a real new beginning.”
The "grand coalition" took six months to build after the 2017 election, leading to political paralysis in Germany, especially on European issues.
Both the SPD and the centre-right have said they are aiming for a conclusion before Christmas.
"Germany will take over the G7 presidency in 2022," Laschet said, which is why a new government must "come very quickly".
Greens and FDP should 'speak to each other'
The Free Democrats' leader, Christian Lindner, said that his party and the Greens should make the first move.
The two parties could become a "progressive centre of a new coalition," Lindner said.
Green leader Annalena Baerbock insisted that “the climate crisis ... is the leading issue of the next government, and that is for us the basis for any talks ... even if we aren't totally satisfied with our result.”
While the Greens improved their support from the last election in 2017, they had higher expectations for Sunday's vote.
The Left Party was projected to win only 4.9% of the vote and risked being kicked out of parliament entirely. The far-right Alternative for Germany — which no one else wants to work with — received 10.3%. This was about 2 percentage points less than in 2017, when it first entered parliament.
Due to Germany’s complicated electoral system, a full breakdown of the result by seats in parliament is still pending.