Led by Prime Minister Mette Frederiksen, Denmark's Social Democrats have won the most votes in the country's general election, but have failed to secure a majority, after the party's weakest showing in more than a century.

Taking 21.9% of the vote, the Social Democrats, who have governed since 2019, finished first in Tuesday's general election.

With 38 parliamentary seats, the party remains the largest by far, but that is not enough to claim victory alone.

Inside Denmark's parliament, Christiansborg, Social Democratic supporters cheered and applauded Frederiksen, as she told the crowd, I'm sorry that we did not get more votes. I had also hoped for a better result.

But there is nothing today that can make me sad that the Social Democrats have once again become the Danes' absolute favourite political party, she concluded.

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 in this tightly contested race that has come right down to the wire.

Claiming a total of 84 seats, the red bloc of left-wing parties has 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 has expressed a preference for forming a government across the center.

But Troels Lund Poulsen, who leads the Liberals, the blue bloc's biggest party, has ruled out going into government again with the Social Democrats, urging Rasmussen to join him on the right.

This has been a bruising election outcome for Frederiksen, whose popularity has waned after six years in power, though many Danes believe she has managed the country well amid international challenges.

The election followed U.S. President Donald Trump's interest in acquiring Greenland, a semi-autonomous Danish territory, but domestic issues, such as living costs and economy, dominated the campaign trail.