Denmark's opposition parties have beaten the governing coalitionafter a close general election.
The centre-right group led by ex-PM Lars Lokke Rasmussen beat Prime Minister Helle Thorning-Schmidt's centre-left coalition, although her party is the largest.
Ms Thorning-Schmidt has now stood down as Social Democratic Party leader.
The right-wing, anti-immigration Danish People's Party will become the second-largest in parliament.
With almost all votes counted, the centre-right bloc led by Mr Rasmussen had secured the 90 seats needed to form a government in the 179-seat parliament.
Turnout was 85.8%, the interior ministry said.
Talks are due to begin soon on forming a cabinet, which correspondents say could take weeks.
Mr Rasmussen wrote on Facebook that "difficult negotiations lie ahead".