(CNN)The leader of Denmark's center-left Social Democratic party, 41-year-old Mette Frederiksen, is on course to become the country's youngest Prime Minister, after an election that inflicted deep losses on the country's far-right.
Far-right populists suffer big losses in Denmark's election
Frederiksen adopted a hardline stance on immigration during the election campaign, luring voters away from the right-wing populist Danish People's Party (DPP).
While far-right parties have made gains in other European countries, the DPP saw its share of the vote dip by half on Wednesday.
Under Frederiksen, the Social Democrats have supported some of the most aggressive anti-immigrant laws in Europe put forward by the current center-right government.
The center-left grouping, which Frederiksen's party leads, is projected to win 45 seats in the Danish parliament, the Folketing, in Wednesday's election, according to national broadcaster DR.
That tally beats the 37 seats won by the three-party center-right bloc led by Prime Minister Lars Lokke Rasmussen of the center-right Venstre party, putting Frederiksen's Social Democrats in position to take power.
In this prosperous nation -- normally associated with its egalitarianism and a high position in various global well-being rankings -- immigration and the welfare state were key issues ahead of Wednesday's vote.
But climate change also punched through as the biggest concern with voters, especially among millennials, Kristian Madsen, a political analyst at the Politiken newspaper, told CNN.
"It was a non-issue in the last election and has come creeping in, really, in the last couple of months," Madsen said, adding that it reflects the healthy state of Denmark, which is enjoying strong public finances, growth and record high public employment.
"If we had a 10% unemployment rate or refugee crisis" like the one in 2015, the priorities would have been different, he added.
DR's exit poll was based on 4,550 voters across 40 polling stations.
After four years in opposition, the resurgence of the Social Democrats has been credited to Frederiksen tacking left on socio-economic issues -- by promises to boost welfare spending and tackle climate issues -- while shifting right on immigration.
By "co-opting the populist right, she is attempting to steal their voter base," Madsen told CNN prior to the exit poll's release.