In the early hours of this morning, Helle Thorning-Schmidt resigned as Danish Prime Minister and leader of the Social Democrats. Yet it was her party that won more votes than any other in yesterday's election. The problem was that her coalition partners didn't perform nearly as well, leaving the centre-left with fewer seats than the right.
It's expected that Lars Løkke Rasmussen, who's already been PM once, will become Denmark's next leader. Over the last few months he's had to battle criticisms over his expenses. His party, The Liberals (Venstre) had its worst election night in twenty-five years, losing around a quarter of its votes. It's now only the third largest party in the Danish parliament. But with the support of those parties on the right, Rasmussen can form a government.
The majority of that support needs to come from the anti-immigration Danish People's Party (DPP). It did better than anyone predicted, winning more than 21% of the vote. It's now the second largest group in Danish politics. But it's not going to make life easy.
I've just spoken to the party's leading MEP, Morten Messerschmidt, a populist figure who won a fifth of all votes in the European elections in Denmark last year. He told me that last night was a "surprising and great result". But he stressed that "it's not our plan" to enter into a formal coalition with The Liberals, preferring instead to support from the side-lines. Of course anything could happen in the on-going negotiations. But at the moment it looks like the DPP will only lend its backing to Rasmussen when it feels like it. And that could make life pretty difficult for the new prime minister.
The policies the party will of course support will centre around cuts to immigration - a popular issue in Danish politics. Rasmussen has already promised to hold emergency talks to discuss the rise in asylum seekers. The Danish People's Party wants to go much further, including a return to border controls - even between Denmark's neighbours Germany and Sweden. "We want to be more like the UK over our borders," Messerschmidt tells me.
And this love affair with the UK's right is only set to continue. All the parties in the Danish blue bloc have already pledged to support David Cameron over EU negotiations and in particular cuts to 'benefit tourism'.
That doesn't mean it will be easy for Rasmussen to keep the right bloc in order. While the Danish People's Party is fairly critical of the EU, his own Liberal Party is supportive. The Liberal Alliance, another likely member of the new coalition, wants a smaller state while the DPP campaigned for more public spending. Just like in the Danish TV series 'Borgen', it will be all about deals, concessions and compromises.
The Danes themselves take their politics and democracy extremely seriously. It's estimated that almost 86% of people who could vote in this election, did.
As for the out-going Prime Minister, Helle Thorning-Schmidt, there will be no shortage of job offers for her. And, who knows, perhaps it will give her more time to spend with her British husband, Labour MP Stephen Kinnock, as he focuses on his own political career.
On Friday, Kinnock spoke to me about his wife's electoral fortunes: "For over ten years Helle has led her party and governed her country with a huge amount of courage, compassion and competence. She fought an inspiring election campaign, and lost on the night by a whisker. Thanks to Helle's success, whoever takes over as party leader will truly be able to hit the ground running, and I have no doubt that the social democrats will be returned to government at the next election. I am very proud of everything that Helle has achieved, and we are now greatly looking forward to some family time over the summer."