The deal would make the Social Democrats' leader, 41-year-old Mette Frederiksen, the country's youngest prime minister after the left-leaning party won the June 5 election.
The Social Democrats won by embracing restrictive immigration policies, a pragmatic tactic that involved returning to the party's anti-migrant roots after two decades of relatively more liberal policies. Denmark's largest party had been in the opposition for the past four years.
Despite differences over welfare and immigration, the left-leaning parties want to back Frederiksen, who is expected to form a government in the next few days. Minority Cabinets are common in Denmark.
Frederiksen admitted it would be a "tough and difficult task."
"These are four very different parties, and no doubt parties with major disagreements on several political issues," she said late Tuesday after 21 days of talks with the Social People's Party, the Red Green Unity List and the centrist Social Liberals.
Frederiksen said the deal identified several goals, including promoting integration in Denmark and reversing the previous government's decision not to accept any refugees under a U.N. quota system.
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 government also wants to fight plastic pollution and reduce greenhouse gas emissions by 70% ahead of 2030, a goal praised by Greenpeace.
The four Danish 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 would reverse some austerity measures in health care and education.
Inger Stoejberg, the outgoing immigration minister known for being a hardliner, criticized the Social Democrats for striking a deal that compromised their self-declared tough immigration stance. They had promised "a strict immigration policy" but "one can't trust" them, she said.
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 keep a majority in parliament after his allies saw their vote share plunge to 8.7% in the June election from 21.1% in 2015.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.