Germany s Chancellor Olaf Scholz walks to attend a press conference during the European leaders summit at the EU parliament in Brussels on February 10, 2023. AFP
While the Berlin vote turned on local issues, the disappointing loss comes as Scholz faces widespread criticism for his hesitant military support for Ukraine in the wake of the Russian invasion last year.
In a court-ordered rerun of the election in 2021, the chancellor's party slipped to their worst postwar result in the capital, where they have held the mayor's office since 2001.
The conservative CDU, in opposition in the city and in the federal parliament, surged to around 28 percent, up from 18 percent.
Berlin, one of the country's 16 federal states, was ordered by courts to return to the ballot boxes after the 2021 election was found not to meet basic democratic standards amid widespread voting issues.
- Coalition trouble -
The outcome of the rerun puts a question mark over the continuation of the coalition between the Social Democrats, Greens and far-left Linke party.
"If we have an opportunity for an SPD-led government, then we will try to organise a stable majority for it," incumbent Social Democrat Mayor Franziska Giffey told ZDF after the first estimates.
But early figures suggested her junior coalition partner the Greens could finish ahead of the Social Democrats with around 18.5 percent of the vote. The Linke party's share of the vote was meanwhile estimated at around 13 percent.
Giffey and the Social Democrats seem to have been penalised by voters following violent scenes in the capital over the New Year, with revellers targeting the emergency services with fireworks in neighbourhoods with a large immigrant population.
The conservative opposition accused Berlin's administration of failing to control the situation and sparked a citywide debate over integration.
The election was also marked by discontent over rising rental prices in the capital and disputes over transport policy.
The result of the elections reflect the Social Democrats' struggles nationally, as Scholz's government -- in power for just over a year -- wrestles with rampant inflation and the fallout of the war in Ukraine.
The difficulties for Scholz's coalition with the Greens and the liberal FDP have been to the benefit of opposition parties.
Along with the conservative CDU, the far-right AfD increased its share of the vote slightly to around nine percent in Sunday's rerun, according to the estimates.
- Marathon vote -
The rerun in Berlin is only the second time in German postwar history that a state election has been declared invalid, after irregularities were reported in a vote in Hamburg in 1991.
The organisation of the 2021 election on the same day as a national vote, a local housing referendum and the Berlin marathon had led to widespread logistical problems.
Ballot papers got stuck in traffic as roads were closed for the race, with lines forming outside polling stations struggling to process votes.
Sunday's election took place under the watchful gaze of international election observers from the Council of Europe, invited in by the city itself to restore trust after the 2021 fiasco.
Berlin also called up an army of 42,000 election helpers -- 8,000 more than last time around -- and gave polling stations extra ballots to avoid shortages.
The German parliament has also resolved for national elections to be partly repeated in Berlin, with the date of that vote yet to be set.