A majority of UN states adopted on Monday a non-binding global pact to better handle migrant flows, Morocco's foreign minister said, though fewer governments joined than had previously worked on the proposal.

Foreign Minister Nasser Bourita announced the decision as host of the UN conference in Marrakesh. There was no formal vote.

In July, all 193 UN members except the United States finalized the so-called Global Compact for Safe, Orderly and Regular Migration to better handle migration.

Since then, the text has come under fire from mostly right-wing European politicians, who say it could increase immigration from African and Arab countries. At least six European Union members — mostly in formerly Communist Eastern Europe — have shunned the accord.

It was not immediately clear how many countries were in Marrakesh. The UN had put the number of governments registered late on Sunday at more than 150.

UN secretary general Antonio Guterres addresses delegates during the opening session of a UN Migration Conference in Marrakech on Monday. The two-day conference has engendered controversy despite the nonbinding nature of the compact on migration. (Mosa'ab Elshamy/Associated Press)

Canadian Immigration Minister Ahmed Hussen said the compact serves as a "useful framework" for source, destination and transit countries for migration — and stressed it is not legally binding on the nations that sign it.

The compact is a framework for co-operation, and aims to reduce illegal migration, help integrate migrants and return them to their home countries.

'A source of collective shame': Guterres

Canadian Conservative Leader Andrew Scheer lashed out at the compact this week, warning it could lead to an erosion of this country's sovereign authority to make decisions on immigration, even though the pact explicitly affirms the sovereign right of states to set their own national migration policies, conforming to international law.

UN Secretary General Antonio Guterres, addressing the conference, called the compact a "road map to prevent suffering and chaos" aimed to benefit everyone. He said over 60,000 migrants have died on the move since 2000, calling that "a source of collective shame."

"In the many places where fertility is declining and life expectancy is rising, economies will stagnate and people will suffer without migration," he said in his opening address.

He stressed the pact won't allow the UN to impose migration policies on member states and is not a legally binding treaty.

Today, Canada announced its adoption of the Global Compact for Safe, Orderly and Regular Migration (GCM), the first non-binding global framework on all aspects of international migration. Learn more: <a href="https://t.co/EUZLIvHfQp">https://t.co/EUZLIvHfQp</a> <a href="https://t.co/rFIIpMKM7H">pic.twitter.com/rFIIpMKM7H</a> —@CitImmCanada

Angela Merkel, who has faced criticism domestically after opening Germany's borders in 2015 to hundreds of thousands of refugees, said co-operation was the only answer to tackle the world's problems.

"The pact is worth fighting for," the German chancellor, one of about a dozen national leaders in Marrakesh, told the forum. "It's about time that we finally tackle migration together."

On Sunday, Chile was the latest country to pull out, while Belgian Prime Minister Charles Michel saw the biggest party in his coalition quit in a dispute over the accord.

In November, Austria's right-wing government, which holds the EU presidency, said it would also withdraw, saying the accord would blur the line between legal and illegal migration.

Australia also said in November it would not sign up to the migration agreement because it would compromise its hardline immigration policy and endanger national security.