The man expected to become Denmark's next prime minister on Friday faced the daunting task of forming a new government after the anti-immigration Danish People's Party (DF) posted a record election score.
Lars Løkke Rasmussen of the right-wing Venstre party is expected to head a new right-wing government, but he will face tough negotiations with the anti-immigration Danish People's Party after its support rose to 21.1 percent of the vote, a sharp rise from 12.3 percent in the previous election.
The result made it Denmark's second largest party and the biggest one in the right-wing bloc -- even bigger than Venstre's -- but whether it would actually join a coalition remained to be seen.
A string of minor but highly publicised spending scandals eroded support for Rasmussen, whose party - until now Denmark's main opposition party - dropped to 19.5 percent, losing more than one in four of the votes they won at the last election.
See also: Denmark's Rasmussen takes power
"Venstre did not get the election we dreamed of, but we got the opportunity to head a government that can harness the upswing and let it gain traction in all of Denmark," he wrote on Facebook.
"That opportunity will be explored in the coming days. Difficult negotiations await," he added.
Prime Minister Helle Thorning-Schmidt tendered her resignation to Queen Margrethe at midday Friday without speaking to journalists as she left the Amalienborg Palace.
Rasmussen was expected to visit the queen later in the day to formally be tasked with forming the new government.
Throughout the campaign DF said it would only join a government if it would result in more political influence than merely providing passive support in parliament for a right-wing administration.
From 2001 until 2011 it backed right-wing governments in return for support on its key issue, tighter migration policies.
Observers have speculated that the party, often accused of populism, could lose its anti-establishment appeal if it enters a coalition.
Morten Messerschmidt, a DF member of the European parliament, said the choice came down to either "committing to a policy for the next four years and then be allowed to sit (there) and administer it", or being in a position where a Rasmussen-led government would have to "ask us every time they want to do something."
"The latter immediately sounds more appealing," he told public broadcaster DR.
Getting DF into the fold is in Rasmussen's best interest, said Roger Buch, head of research at the Danish School of Media and Journalism in Aarhus.
Otherwise he faces "having to go to 'big brother DF' in front of rolling cameras every time something needs to be negotiated," he told the Jyllands-Posten newspaper.
Peter Nedergaard, a political science professor at the University of Copenhagen, said he thought DF's newfound clout was unlikely to have a dramatic impact on Danish politics.
"I think there's a misconception in the international press about the Danish People's Party. It's seen as an extreme right-wing, xenophobic, racist party which is not all true," he told AFP.
"If you look at its day-to-day policies ... it's rather moderate. I would call it a social conservative party," he added.
Another expert said ideological differences would pose challenges for a coalition including DF. "If they can do it in the long run, that's where the challenge lies," Johannes Andersen, a political scientist at Aalborg University told the Jyllands-Posten.
After Kristian Thulesen Dahl took the reins of the party in 2012 he was credited with broadening its appeal, and he is seen as a less divisive figure than his outspoken predecessor, Pia Kjærsgaard.
Under the 45-year-old leader, DF toned down some of its most inflammatory rhetoric on immigration and veered to the left on economic issues.
While Venstre wants to freeze public spending, DF wants to raise it, and it wants corporate taxes at a level higher than that sought not only by its allies on the right but also the Social Democrats.
That, along with disagreements over Europe, means it sits uneasily with the other three business-friendly parties that make up Denmark's right-wing bloc.