Denmark’s new prime minister is the youngest in the country’s history.

Mette Frederiksen, 41, was able to form a left-wing coalition government led by her Social Democrat party after three weeks of negotiations.

“Now we have reached the goal … we have shown that when Danes vote as they have done, a new majority can turn their hopes into actions,” said Frederiksen.

Denmark’s election on June 5 saw support for the Social Democrats decline slightly, but the coalition of left-wing parties won a clear majority, prompting the resignation of conservative Prime Minister Lars Løkke Rasmussen.

The right-wing nationalist Danish People’s Party (DPP), which had been the country’s second largest party, lost more than half its votes compared with 2015. The party made headlines during the campaign after demanding the deportation of Muslims.

Denmark is the third Nordic country to form a leftist government, after Social Democrats came into power in Finland and Sweden earlier this year.

As in the rest of Europe, immigration was a key issue in the election. Frederiksen campaigned in favor of strict controls on refugees and asylum seekers, a measure that was seen as a necessity to win back votes from the DPP.

Following spending cuts by the previous government, the Social Democrats have promised to increase welfare spending and impose higher taxes on the wealthy.

Frederiksen will lead a minority government backed by the Socialist People’s Party, the Red-Green Alliance and the Social-Liberal Party.

Frederiksen joins other young leaders including New Zealand Prime Minister Jacinda Ardern, 38; Irish Taoiseach Leo Varadkar, 40; and French President Emmanuel Macron, 41.

She is Denmark’s second female prime minister after Helle Thorning-Schmidt, also a Social Democrat, who was in power from 2011 to 2015.

Write to Julia Webster at julia.webster@time.com.