COPENHAGEN, Denmark (AP) — Denmark’s new Social Democratic prime minister announced her government Thursday after winning the support of three smaller left-wing parties.

Prime Minister Mette Frederiksen, who at 41 is Denmark’s youngest ever leader, said the party’s number two, Nicolai Wammen, will be finance minister while the justice portfolio goes to Nick Haekkerup.

She also appointed a recently elected member of the European Parliament to the post of foreign minister. Jeppe Kofod won’t be taking up his post at the European Parliament.

There were seven women on the 20-name list.

The Social Democrats won the June 5 partly because they embraced fairly restrictive immigration policies. The Social Democrats will govern as a minority with the support of the smaller left-wing parties. Minority Cabinets are common in Denmark.

However, to form a government, Frederiksen had to back away from some hard-line immigration proposals to win support from three other left-wing parties.

Frederiksen finalized a deal with the Social People’s Party, the Red Green Unity List and the centrist Social Liberals late Tuesday after 21 days of negotiations. Together they identified several goals, including reversing the previous government’s decision not to accept any refugees under a U.N. quota system and reducing greenhouse gas emissions by 70% ahead of 2030.

Advertising

The U.N. refugee agency has made deals with countries, including Denmark, to take in refugees. Since 1989, Denmark has accepted about 500 such refugees every year.

The four parties also agreed to drop plans to put rejected asylum-seekers and foreigners convicted of crimes on a tiny island that formerly housed facilities for researching contagious animal diseases. They also want to reverse some austerity measures in health care and education.

The June 5 elections for Denmark’s 179-seat Folketing, or Parliament, dealt a blow to the populist, anti-immigration Danish People’s Party, which had been supporting Denmark’s center-right prime minister, who resigned.

Former Prime Minister Lars Loekke Rasmussen failed to get a majority in parliament after his allies saw their vote share plunge to 8.7% in the June election from 21.1% in 2015.