Danish Prime Minister has conceded defeat in parliamentary election and resigned as Social Democratic party leader after a record score for an anti-immigration party lifted the opposition right-wing bloc to victory.

"Tomorrow I will go to the Queen and tell her that the government is stepping down. Now it is up to Lars Lokke Rasmussen to try to form a government," Helle Thorning-Schmidt said, referring to the leader of the main right-wing party Venstre.

With all of the votes counted on the mainland, state broadcaster DR projected 90 seats for the opposition coalition in parliament to 85 seats for the ruling centre-left bloc of the prime minister Thorning-Schmidt.

The results represent a surprise yet clear victory for the bloc led by former prime minister Lars Lokke Rasmussen, even though his Venstre party won fewer votes than the right-wing Danish People's Party (DF) which is part of his alliance.

"The coming days will determine whether it will be possible to build a majority for a (government) platform that will lead Denmark down the right path," Rasmussen told cheering supporters after the election results came in.

DF has emerged as the second largest party in parliament after Thorning-Schmidt's Social Democrats with a record 21 percent of votes, while the Venstre party garnered 19.5 percent of votes.

Despite the outcome, DF has been coy about whether it would even enter a government for the first time in its 20-year history.

"What we have said before the election is also what we will follow after the election - that we will be where the political influence is greatest," said DF leader Kristian Thulesen Dahl.

"If that is in a government, then that is where we will be. If it is outside of the government, then that it where we will be. That is the driver for us, not ministerial titles."

Rasmussen, 51, is a seasoned political operator with over 20 years in parliament. His jovial charm has often gone down better with voters than the more formal approach of his adversary, outgoing Prime Minister Helle Thorning-Schmidt.

Opinion polls throughout the campaign, as well as exit polls, put the centre-left and centre-right neck and neck. Thorning-Schmidt called an early election, hoping to capitalise on an economic recovery that followed unpopular reforms after she took power as Denmark's first female prime minister in 2011.

Source: AFP And Reuters