The New Zealand government will sign up to a United Nations Migration Compact, despite other countries like Australia and the United States pulling out.
National said it would never sign it, and would pull New Zealand out if it got back into power.
National's foreign affairs spokesperson Todd McClay said at the time it could affect New Zealand's ability to set its own migration policy.
"The government should not sign this agreement," he said.
"[It] treats legal and illegal migration the same and calls for restrictions on freedom of speech and the media. It is likely to have a detrimental effect on New Zealand's ability to set independent policy today and in the future."
However, Foreign Affairs Minister Winston Peters today said it didn't, and that there was now had legal advice to back that up.
He said the agreement was not legally binding, did not create legal obligations nor establish customary international law - and that this advice was not surprising.
"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."
He said New Zealand was voting for the Compact because it supported greater efforts in controlling international migration issues.
"We are aware that the statements of other countries voting in support of the compact, such as the United Kingdom, are underpinned by legal advice supporting their positions," Mr Peters said.
"In the end, New Zealand will be voting for a co-operation framework that was clearly set out at the start of the compact's negotiations process in 2016 when the New York Declaration for Refugees and Migrants was unanimously adopted by all UN member states, including New Zealand under the previous government."