COPENHAGEN — The leader of Denmark’s center-left Social Democratic party, Mette Frederiksen, will form a minority government and become the country’s next prime minister after striking a deal with several other left-leaning parties.

The agreement, reached just before midnight on Tuesday, is likely to usher in major new action on climate change and a softening of some policies on migrants, after elections this month in which those issues were top of many Danish voters’ list of priorities.

It is also a change in direction for Denmark after four years under the conservative Venstre party of former Prime Minister Lars Lokke Rasmussen, which had steered the country to the right, particularly after elections in 2015 when Venstre formed a minority coalition with support from other right-leaning parties, including the populist Danish People’s Party.

But a heavy defeat for the Danish People’s Party this month led Mr. Rasmussen to step down. Various left-leaning parties together won a majority in the 179-seat Parliament, a result that echoed returns elsewhere in the region, including in Iceland, Finland and Sweden, which all have center-left coalitions, albeit fragile ones.