|Analysts say the preliminary votes are a sign that Merkel's government won't last [AFP]
The result was predictable – the damage it may have done, is not.
After a process dragged out over several hours, Angela Merkel finally got her candidate elected to the German presidency, but the battle has left her authority undermined - some suggest fatally.
With a working majority of 21 in the electoral college of MPs and senators who vote on the president, the German chancellor hoped for a quick, clean win.
She didn't get it. It took three ballots to elevate Christian Wullf to the top job – something that's only happened twice before since the Second World War when the new constitution was introduced.
It was clear this would be a long fight after the first ballot when it was revealed 44 members of the ruling three-party coalition cast their votes for someone other than Wulff.
Outside the Reichstag, the parliament building, crowds sat in the summer sun and followed the proceedings on a large screen TV.
As the result of the first ballot was announced there was applause for Joaquim Gauck, the second placed candidate, and the man opinion polls suggest most Germans would like as president.
In contrast to the reception given to Gauck, a 70-year-old former human rights campaigner in Communist East Germany, a stony silence met the announcement that Wulff had topped the poll.
And so the 1,242 members of the electoral college – two were ill – began the whole process again.
Each was called forward in alphabetical order and placed their paper in the box.
When the final ballot was cast, Wulff again topped the poll, picking up a few more votes but failing to amass an absolute majority. Gauck was second again.
Battle lines drawn
The third and final ballot was delayed. The political parties wanted to talk and consult. The final battle lines being drawn.
This time a simple majority would do rather than the absolute majority required in the first two rounds.
As Gauck's tally was announced - 424 votes - some members of the Reichstag stood and applauded. It was a genuine reflection of the affection for a hugely popular man.
|Whatever damage may have been done, Merkel did get her candidate elected [AFP]
Wulff knew he'd won. The 625 votes confirmation he would be the new president.
There were smiles and handshakes from Merkel and her colleagues, but surprisingly, a few boos, too.
One hundred and twenty one abstentions were recorded.
The extreme left wing party having found neither candidate to its liking.
Outside, next to the Spree river which runs by the parliament, I spoke with Hajo Funke, a political science lecturer at the Free University here.
"This is the beginning of the end of Merkel's coalition," he said.
"She's lost the momentum to be chancellor and her authority is fading away.
"She may last a month or two, but the chances of this government lasting ended with this vote."
There are two positives for Merkel on Thursday morning. Firstly - she won. Perhaps not as decisively as she would have liked, but she won.
And secondly, parliament now breaks for the summer, which gives her time to regroup, re-organise and stop her coalition government falling apart.