Prime Minister Mette Frederiksen's Social Democrats won the most votes in Tuesday's Danish general election but slumped to its weakest performance since 1903, as her coalition bloc failed to secure a majority.

With 21.9% of the vote, Frederiksen's party still has by the far the most seats, but her left-wing grouping has fallen well short of the 90 seats needed to form a majority.

The Social Democrats have been in power since 2019, and Frederiksen told cheering supporters she was sorry that we did not get more votes.

In a message of defiance, she added: There is nothing today that can make me sad that the Social Democrats have once again become the Danes' absolute favourite political party.

The Social Democrats' main right-wing rival, the Liberal party Venstre, also had its worst showing for a century, with just 10.1%, falling behind the Green Left SF.

Frederiksen still has a chance to stay in power for a third term, however Denmark is typically run by coalition governments, and so tough negotiations - which could take days or weeks - now loom.

Twelve different political parties were on the ballot paper, and this tightly contested race has come right down to the wire.

Claiming a total of 84 seats, the red bloc of left-wing parties have clinched a small lead over the blue bloc on the right, who have 77 seats combined.

Both blocs have fallen short of the 90 seats that are needed for a majority in Denmark's 179-seat parliament.

It is not yet clear which bloc will be able to build a majority.

I have been responsible for this wonderful country for almost 7 years, Frederiksen continued. I am still ready to take on responsibility as Denmark's prime minister.

However, the Moderates, a small party holding 14 seats in the middle, now have the power to act as kingmaker, and all eyes are on its leader, former Prime Minister Lars Løkke Rasmussen.

He took the lead in handling the Greenland stand-off with the United States, and went viral for his fist-bump following a meeting with Vice President JD Vance and Secretary of State Marco Rubio in Washington.

With his signature pipe in hand, and surrounded by supporters on Tuesday night, Rasmussen told the crowd he favoured forming a government across the centre.

We're standing in the middle, he said. We're ready.

But Troels Lund Poulsen, who leads the Liberals, the blue bloc's biggest party, has flatly ruled out going into government again with the Social Democrats, and urged Rasmussen to join him on the right. It is possible to get a new direction in Denmark, he said.

DR's political correspondent, Christine Cordsen, has suggested that the most likely outcome is a center-left government with the Social Democrats, Red-Greens, the Moderates and the Danish Social Liberal Party.

This has been a bruising election outcome for Frederiksen, who after six years in power has seen her popularity wane, even as most Danes say they think she's done a good job steering Denmark through international crises.

The election has come in the wake of US President Donald Trump's repeated demands to acquire Greenland, a semi-autonomous Danish territory.

Frederiksen, 48, called the vote months earlier than expected, gambling that her boosted poll numbers over her handling of US President Donald Trump's threat to annex Greenland would help hand her a third term.

However it was domestic, rather than geopolitical concerns, that dominated the campaign trail. These included the cost of living, the state of the economy and welfare concerns, though the high level of pesticides in drinking water – because of pig farming – and the climate footprint of agriculture have also become a concern for voters.