Franziska Giffey and her Social Democrats have pulled slightly ahead of the Greens in the race for the Berlin state parliament, according to the latest projections from broadcasters ZDF and RBB.
The SPD came in at between 21.8 and 21.9 per cent of the vote, while the Greens and their top candidate, Bettina Jarasch, came in between 19.7 and 19.9 per cent, according to projections from German broadcasters.
Based on the projections, only a three-party alliance is possible; a two-party alliance between the Greens and SPD would not be enough.
Berlin is currently governed by a coalition government led by the SPD along with the hard-left Die Linke (The Left) and the Greens.
While coalition options are still unclear, a continuation of the current one is at least possible, as Die Linke achieved between 13.9 and 14.2 per cent based on projections.
The centre-right Christian Democrats (CDU) were in third place and in the range of its historically worst result of 2016 (17.6 per cent) with 17.4 to 18.3 per cent.
However, it's still enough numbers-wise to raise the possibility of a coalition, and the CDU's Kai Wegner has said that his party ran with the goal of ending the current Berlin coalition
The pro-business Free Democrats (FDP) meanwhile came in at 6.9 and 7.4 per cent, while the AfD saw between 7.9 and 8.2 per cent.
In the end, as the evening wore on, it seemed the Greens would not perform well enough for their first election victory in Berlin.
Still, Jarasch said she was delighted with the forecasts, which represent the best result ever achieved by the Greens for the state parliament.
"Berlin has voted and it's great," she said, while reaffirming her claim to lead the city.
Giffey, who initially commented cautiously on the incoming forecasts and projections, meanwhile became more triumphant.
Governing Berlin Mayor Michael Mueller of the SPD had decided not to run again for the state parliament, leaving the race open for who runs the left-leaning city.
The 43-year-old Giffey had already made a name for herself in the capital as mayor of the district of Neukoelln.
From 2018 until May this year, Giffey was federal minister for family affairs. She resigned because of a plagiarism affair surrounding her doctoral thesis, and her doctorate was revoked by the Free University of Berlin in June.
Jarasch, 52, who comes from the Bavarian city of Augsburg, was a compromise candidate within the Greens. She was state chairperson from 2011 to 2016.
Berlin, a city of of 3.7 million inhabitants, has only once been ruled by a woman for a short time: From 1947 to 1948, the Social Democrat Louise Schroeder headed the administration as acting mayor.
Berliners faced long queues to cast their votes, long after exit polls had begun to roll in at 6 pm (1600 GMT).
In some cases people had to wait until shortly before 8 pm. In some cases, there were waiting times of more than two hours.
Anyone who had queued at the polling stations before they officially closed were as a rule still allowed to cast their vote.
Berlin's state election commissioner, Petra Michaelis, said that she did not expect the election results to be distorted due to the late voting. "I assume that the people who had queued up were still able to cast their votes unaffected and that no electoral errors will result from this," she told RBB.
Michaelis could not explain why ballots had been missing from some polling places and pointed out that the Berlin Marathon, which also took place Sunday, could have impeded the delivery of ballots.
"A multitude of events is not the best thing for holding an election," she said..