New Zealand will support the United Nations Global Compact for Safe, Orderly and Regular Migration after receiving legal advice saying it won't affect national sovereignty.

The Compact is the first "inter-governmentally negotiated agreement prepared under the auspices of the United Nations" that deals with all aspects of international migration.

The agreement, which has been consistently supported by the Green Party, creates non-legally binding conditions for countries to "enable all migrants to enrich our societies through their human, economic and social capacities," according to the UN.

While the Compact was officially adopted in Marrakesh, Morocco last week, Foreign Affairs Minister Winston Peters has been waiting on legal advice before declaring New Zealand's support.

"The Government would not support the UN compact if it compromised New Zealand’s sovereignty or could in any way take precedence over our immigration or domestic laws. But the compact does not do that," said Mr Peters.

"The Crown Law Office and the Ministry of Foreign Affairs and Trade have provided legal advice which confirms this UN cooperation framework is neither legally binding nor constraining on this country setting its own migration policies."

The legal advice said it does not create "customary international law", "any new human rights law" and "in no way restricts or curtails established human rights, including the right to freedom of speech".

Mr Peters said the advice was not surprising but did debunk falsehoods and misguided perceptions about the Compact.

Several countries, like Australia and the United States, had earlier pulled out citing concerns about the effect the agreement may have on national sovereignty and nations' ability to set their own migration and foreign policy.

The National Party has vehemently opposed the agreement and responded to the announcment by saying it would overturn the Government's support if it gains power.

"Mr Peters has sprung the signing of the Compact on New Zealanders on the last day of Parliament, even though both he and the Prime Minister were this week still claiming no decision had been made. The Compact has been under consideration since February," said Foreign Affairs spokesperson Todd McClay.

Earlier this month, National leader Simon Bridges said: "There is no automatic right to migrate to another country without that country's full agreement, a view which the United Nation's Global Compact on Migration, set to be signed next week, seeks to counter".

"While not binding, the Compact could restrict the ability of future governments to set immigration and foreign policy, and to decide on which migrants are welcome and which aren't."