Helle Thorning-Schmidt, who also is quitting as Social Democratic leader, presented her resignation to Queen Margrethe at the royal palace.
The Danish People's Party that wants to limit the European Union's influence over the Scandinavian country, made large gains in yesterday's elections and overtook Lars Loekke Rasmussen's Liberal Party as Denmark's second largest party.
The bloc led by Loekke Rasmussen, a former prime minister, secured the 90 seats necessary for a majority in Parliament. To form a government, he needs to include the Danish People's Party that surged to 21 per cent, in talks expected to start later today.
The Danish People's Party also has called for border controls to be reintroduced on the boundaries with Germany and Sweden. That's controversial among many EU members who feel it would challenge the spirit of a borderless Europe.
More From This Section
Kasper Moeller Hansen, a political science professor with Copenhagen University, said talks will take weeks, adding Loekke Rasmussen has to "try to figure out that relationship with the Danish People's Party."
Loekke Rasmussen wrote on Facebook that "difficult negotiations lie ahead."