The centre-left coalition led by the Social Democratic party won a closely contested election in Denmark, which will now be led by the first-ever female premier.
Helle Thorning-Schmidt, whose party led an alliance known as the Red Bloc, claimed victory about three hours after the polls closed. "We've written history today," Thorning-Schmidt said.
The Red bloc won a slim majority of five seats in Denmark's 179-seat parliament, according to a preliminary tally. Turnout was a high 87.7%.
As of today, Denmark's prime minister-in-waiting Thorning-Schmidt will face the tricky task of piecing together a centre-left government after an election which ended 10 years of centre-right rule.
Climbing rather than sweeping to victory yesterday, Thorning-Schmidt led a diverse 'Red bloc' of parties that succeeded in tapping voter anger about the state of the economy and ousting Prime Minister Lars Lokke Rasmussen.
For Denmark, a nation of 5.5 million people, the election turned on the issue that has also divided many other European countries struggling with low growth, large government deficits and record national debt.
Complicating the task of forming a government is the fact that the two biggest winners of the night were the far-left Red-Green Alliance and the centrist Social Liberals.
Both back Thorning-Schmidt but agree on little else. Thorning-Schmidt's own Social Democrats actually lost ground and will be the second largest party after Rasmussen's Liberals.
"That is the political challenge," said Jorgen Elklit, political scientist at the University of Aarhus. "It will certainly take days, maybe weeks to form a government."
The economy will be the first task as Denmark prepares to take over the rotating presidency of the EU in January next year. Thorning-Schmidt's platform included increased government spending, raising taxes on the wealthy and an unusual plan to make everyone work 12 minutes more per day. An extra hour each week, her group argues, would help kick-start economic growth.
Voters turn against ruling governments
With Thorning-Schmidt's election, Denmark becomes the latest in a series of European countries to vote out incumbents at least in part because of struggling economies.
Ireland, Britain, Portugal, Finland and The Netherlands have all seen changes.
Spain's Socialist government is facing possible defeat in a 20 November general election and German Chancellor Angela Merkel has lost a series of state elections since May 2010.
Denmark has been spared much of the trauma suffered by other West European countries because it remains outside the euro zone. This means it is not involved in bailing out debt-laden countries like Greece, an issue that has stirred popular anger in neighbouring Germany.
But the economic crisis has turned Denmark's healthy surpluses into deficits, forecast to climb to 4.6% of GDP next year.
Danish banks have also been struggling, with small bank Fjordbank Mors falling into the hands of administrators in June, the ninth Danish bank to be taken over by the state since the start of the crisis in 2008.
The new prime minister is part of an extended European political family, married to the son of Neil and Glenys Kinnock. Neil was a European commissioner and British Labour Party leader, Glenys a European parliamentary deputy and Europe minister in the last Labour government.
EURACTIV with Reuters