Germany’s center-left Social Democrats narrowly defeated outgoing Chancellor Angela Merkel's center-right bloc in national elections, giving them the edge in the hard fought race to determine who will succeed the leader of the European Union's strongest economy and most populous country.

While there were no big winners in Sunday’s elections, there was a clear loser – Merkel’s Christian Democratic Union (CDU) - which had their worst showing in history. The party, which runs on a combined ticket with its Bavarian Christian Social Union (CSU), won 24.1% of the vote, according to preliminary official results, down from nearly 33% in the previous national elections in 2017.

The center-left Social Democratic Party (SPD) edged Merkel’s party by 1.6 points. The SPD’s 25.7% finish was a gain of five points from 2017.

SOCIAL DEMOCRATS TAKE LEAD OVER MERKEL'S PARTY AS GERMAN ELECTION RESULTS POUR IN

With Sunday’s election over, another contest is now underway – the fight by the top two parties to build a coalition to succeed Merkel, who’s served 16 years steering Germany and who made history as the country’s first female chancellor.

Germans didn’t actually vote for chancellor in the election. Instead, they cast ballots for a local lawmaker and for their preferred party.

German elections to the Bundestag – the country’s legislature - are run on a system of proportional representation, meaning that each party's vote share relates directly to how many seats they get in parliament. That principle makes it virtually impossible for a party to lead a government alone. Coalitions must instead be formed after the vote.

It will likely take at least three parties to form a governing coalition, and the post-election political posturing has already begun.

German election candidates

Candidates for the German election attended a final televised debate in Berlin, Thursday Sept. 23, 2021. From left to 4th left, Alice Weidel, Alice Weidel, co-leader of the Alternative for Germany party (AfD), Christian Lindner, leader of the Free Democratic Party (FDP), Markus Soeder, Christian Social Union party leader and Bavarian Prime Minister, Armin Laschet, chairman of the German Christian Democratic Union. From 3rd right to right, Annalena Baerbock, Green Party co-leader, Olaf Scholz, Finance Minister and SPD candidate, and Janine Wissler, co-leader of the left party Die Linke. (Tobias Schwarz/Pool via AP) (AP)

The Social Democrats’ candidate Olaf Scholz, the outgoing vice chancellor and finance minister who pulled his party out of a years-long slump, said the outcome was "a very clear mandate to ensure now that we put together a good, pragmatic government for Germany."

But Merkel’s party said it too would reach out to smaller parties to discuss forming a government, while the chancellor stays on in a caretaker role until a successor is sworn in.

CLICK HERE FOR THE LATEST FOX NEWS REPORTING ON GERMANY

Armin Laschet, the governor of North Rhine-Westphalia state and the nominee for chancellor for Merkel’s Union bloc, acknowledged that "this is a loss of votes that isn’t pretty," but pledged "we will do everything we can to form a government under the Union’s leadership."

Both Laschet and Scholz will be courting the same two parties: the environmentalist Greens, who finished third with 14.8%; and the pro-business Free Democrats, who took 11.5% of the vote. The Greens traditionally lean toward the Social Democrats and the Free Democrats toward the Union, but neither ruled out going the other way.

Another possible outcome is the least favorite – a continuation of the a grand coalition between Merkel’s conservative Union and the SPD that’s run the country the past eight years. 

In this July 15, 2021, file photo President Joe Biden meets with German Chancellor Angela Merkel in the Oval Office of the White House in Washington. The United States and Germany have reached a deal that will allow the completion of a controversial Russian gas pipeline to Europe without the imposition of further U.S. sanctions, a senior U.S. official said Wednesday, July 21.

In this July 15, 2021, file photo President Joe Biden meets with German Chancellor Angela Merkel in the Oval Office of the White House in Washington. The United States and Germany have reached a deal that will allow the completion of a controversial Russian gas pipeline to Europe without the imposition of further U.S. sanctions, a senior U.S. official said Wednesday, July 21. (AP Photo/Evan Vucci, File)

Whomever become chancellor will have a tough task succeeding Merkel – who’s dealt during her tenure with four U.S. presidents - George W. Bush, Barack Obama, Donald Trump and now Joe Biden.

CLICK HERE TO GET THE FOX NEWS APP

Under Merkel’s watch, Germany’s become known as the European Union’s de facto leader, and the chancellor will likely be remembered as a pragmatic leader with an ability to keep her job by striking political compromises.

And Merkel – in Germany, Europe and around the world – has earned a reputation as an honest broker and a reliable partner.

Material from the Associated Press was used in this report