Incumbent Mayor Klaus Wowereit led the SPD to a third consecutive victory in the German capital, even as his party suffered mild losses. According to early exit polls, the Social Democrats won almost 29 percent of the vote, down two percentage points from five years ago.
Chancellor Angela Merkel's conservative Christian Democratic Union (CDU) was able to improve its result by two points to over 23 percent, while the environmentalist Greens jumped four points to almost 18 percent – the party's best showing in Berlin ever.
Wowereit's current coalition partners, the socialist party The Left (Die Linke), dropped nearly two percentage points to around 11 percent, meaning they will no longer stay in government.
"We worked well together, but unfortunately that is no longer possible," said a buoyant Wowereit to SPD supporters after the results were announced.
The biggest surprise of the vote was the smashing success of the Pirate Party – a motley outfit advocating civil liberties, as well as privacy and technology issues. The Pirates sailed easily into the state legislature with nine percent of the vote.
"We'll see what happens in parliament when the citizens see a different type of politics," said Andreas Baum, the 33-year-old head of Berlin chapter of the Pirate Party.
The upstart Pirates put the result of the Free Democrats (FDP) to shame, as the pro-business party won a paltry two percent and will no longer be represented in the state legislature.
Although the Greens dramatically improved their result from the last election and are set to join the city government, at the outset of the campaign it appeared as if they might challenge Wowereit for the keys to the mayor's office.
But their high-profile candidate, former federal Consumer Affairs Minister Renate Künast proved to be a poor campaigner and in recent days she said the Greens would be happy to be junior partner to Wowereit's SPD.
"After 10 years of standstill we want to govern," Künast told public broadcaster ARD. "But we won't simply be a cheap replacement for The Left. There will have to be priority for Green policies."
In contrast, the 57-year-old hugely popular and openly gay Wowereit ran a smooth, gaffe-free campaign.
His backers say Wowereit has helped turn Berlin's weaknesses into strengths, famously calling the cash-strapped capital "poor but sexy" for attracting hordes of tourists and creative types to one of Europe's most affordable cities.
But with a 13-percent jobless rate – nearly double the national average – and a staggering €62-billion ($86-billion) mountain of debt more than two decades after the Berlin Wall fell, critics say the city needs a major economic overhaul.
While the poll will have no direct bearing on Merkel's parliamentary majority at the federal level, it caps a horror year for the leader of Europe's top economy.
Her conservatives have suffered a string of state election defeats amid accusations the chancellor has shown a lack of leadership during the eurozone debt crisis and failed to quell unruly elements in her prickly centre-right government.
The dire Berlin result of the FDP, Merkel's junior coalition partners, could raise fears that the party could become more erratic and unpredictable than it already has been in recent months.
Meanwhile the Social Democrats, the biggest opposition party at the national level, hope the Berlin vote can give it another boost on the road to the 2013 general election.