German Chancellor Angela Merkel

United Nations member states adopted on Monday a landmark global pact to better handle migrant flows, despite a slew of countries shunning it.

Moroccan Foreign Minister Nasser Bourita announced the adoption of the Global Compact for Migration at a conference in the Moroccan city of Marrakech, which was attended by official delegations from more than 150 countries.

In July this year, 192 countries unanimously approved the pact following 18 months of negotiations. The United States backed out in December 2017.

In recent months, several countries publicly rejected or backed down on their support of the agreement, including Hungary, Austria, Italy, Bulgaria, Croatia, Slovakia, the Czech Republic and Switzerland. The Belgian government split over the pact on Sunday.

They mostly cited concerns about domestic immigration policies.

The 34-page pact still needs to be endorsed by the UN General Assembly.

It lays out 23 objectives to ensure "safe, orderly and regular" migration, including protecting migrants from exploitation and human rights abuses.

Speaking at the opening session of the two-day conference, UN chief Antonio Guterres dispelled "falsehoods" on the agreement.

He rejected as "false" claims that the United Nations seeks to impose migration policies on the member states that infringe their sovereignty.

"The compact is not a treaty. Moreover, it is not legally binding. It is a framework for international cooperation," he said.

He asserted the importance of the pact as a "roadmap to prevent the suffering and chaos and to provide cooperation strategies that will benefit all."

German Chancellor Angela Merkel, who attended the conference, described the UN accord as a "milestone" in developing a multilateral approach to migration.

Speaking in Marrakech, Merkel said the accord is a major step in the battle against people smugglers. She added that migration is a normal phenomenon, "and when it's legal, also good."

She said that the pact would help stem illegal migration, which is why Germany would continue to support it.