The Eurosceptic Danish People’s Party looked set to become the largest party in a new right-wing coalition government, in an election which will mark a new high for populist parties in Europe.

With 80 per cent of the vote counted, the anti-immigrant party was expected to take 21.3 per cent of the vote, leap-frogging its Liberal Party allies to become Denmark’s second-biggest party.

The unexpectedly strong result has left Danes wondering if Liberal leader Lars Loekke Rasmussen can still become the country’s next prime minister, given that his party has shed more than 7 per cent of its vote.

The People’s Party leader, Kristian Thulesen Dahl, left all his options open when he spoke, saying that it was still not a certainty that his party would enter a coalition government.

“We need to be where the political influence is greatest, and this is not automatically in the government,” he said.

With 85 per cent of the vote counted, five right-wing parties held 90 out of the 179 seats in the parliament to the left wing parties’ 85.

“As it looks now, it seems we have lost the election,” Carsten Hansen, a senior member of the governing Social Democratic Party, said.

The election has been watched unusually closely in the UK ever since Mr Lokke Rasmussen struck an agreement with three other right-wing parties to back David Cameron’s push for EU reform. He looked set to oust the country’s first female Prime Minister, Helle Thorning-Schmidt, of the Social Democratic party.

Earlier as she arrived outside a Copenhagen polling station alongside her husband, Stephen Kinnock, a British Labour MP, she said: “I’m asking people to vote for certainty and they know what they get with me. They get a stable economy and they get good welfare.”

Over a three-week campaign, Ms Thorning-Schmidt, 48, and her allies had eliminated the wider lead of the five right-wing parties, leaving the two sides neck-and-neck right up until the final hours – a striking comeback given that at one point during her near four-year term her coalition was 28 points behind.

But it appeared that the fightback had fallen short.

Ms Thorning-Schmidt took her party far to the right on immigration, and exploited a series of expenses scandals surrounding her rival.