Denmark's centre-right government of Prime Minister Anders Fogh Rasmussen has won a snap election, securing a third consecutive term in office.
Mr Rasmussen called the election as his poll ratings were high
His Liberal-Conservative coalition and allies won 90 of the 179 seats in parliament, near complete results show.
The centre-left opposition led by the Social Democrats secured 84 seats.
Mr Rasmussen now faces tough talks on whether to expand the ruling bloc by including a new party led by a Syria-born Palestinian immigrant.
Turnout was higher than in the previous poll, held in 2005, at over 86%.
"It's a good day for Denmark. Everything indicates that the government can continue," Mr Rasmussen, 54, told his jubilant supporters after victory became clear.
THE NEW DANISH PARLIAMENT
Liberal Party 46 (-6)
Social Democrats 45 (-1)
Danish People's Party 25 (+1)
Socialist Party 23 (+12)
Conservative Party 18 (no change)
New Alliance 5 (+5)
Social Democrat leader Helle Thorning-Schmidt admitted her party had failed to gain enough votes, saying: "It was not enough."
"We'll do it next time," she added.
With all the votes counted, Mr Rasmussen's Liberal Party lost six of its seats to secure 46 berths in the parliament, the Folketing, while the Conservatives remained unchanged at 18.
But the coalition's majority was assured thanks to a strong showing by the right-wing Danish People's Party (DPP). The minority Liberal-Conservative cabinet has until now counted on the support of the DPP.
Another allied party appeared to have won one of two seats in the semi-autonomous Faroe Islands.
Mr Rasmussen's bloc now has to decide whether to include the recently formed New Alliance party, headed by Naser Khader, a Palestinian immigrant. The party won five seats.
Although Mr Khader said his choice would be to side with the prime minister, many now expect negotiations along the way.
A coalition including the anti-immigrant DPP and Mr Khader's party could also be unstable, some analysts say.
Complete official results are expected later on Wednesday.
The issues of welfare and tax reforms, immigration and the environment led to much campaign wrangling.
But all the main parties seem to agree on the core issues and campaigning has been more about who wields power than any policy change, correspondents say.
Mr Rasmussen called the early election three weeks ago, taking advantage of high approval ratings and strong economic growth.