Lars Lokke 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 (DPP) after its support rose to 21.1 per cent of the vote, a sharp rise from 12.3 per cent 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.
"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 without speaking to journalists as she left the Amalienborg Palace.
Throughout the campaign the DPP 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.
