Updated

More than 190 countries agreed on a global compact to promote safe and orderly migration and reduce human smuggling and trafficking Friday, culminating lengthy negotiations on the often contentious issue that were boycotted by the United States.

Secretary-General Antonio Guterres, General Assembly President Miroslav Lajcak and many other supporters hailed the first global document to tackle the migration issue. Mexican Ambassador Juan Gomez Camacho, co-facilitator of the negotiations, called it "a historic day" after decades of efforts.

The Global Compact for Safety, Orderly and Regular Migration is not legally binding and is to be formally adopted at a ministerial meeting in Marrakesh, Morocco, on Dec. 11-12.

But Lajcak predicted that even though it isn't legally binding it will change the way the world looks at the migration issue — just as the U.N. goals for 2030 that also aren't legally binding have mobilized the world to tackle poverty, promote development and preserve the environment.

"We still have 192 countries that agreed on the text of the compact and we keep the door open for the United States to come back," he said.

Hungary's foreign minister, Peter Szijjarto, told diplomats after the agreement was adopted by consensus that his government disagrees with key points and will discuss "the possibility of disassociation" from the compact at a meeting Wednesday.

In September 2016, all 193 U.N. member states, including the United States under President Barack Obama, adopted a declaration saying no country can manage international migration on its own and agreeing to launch a process leading to the adoption of a global compact in 2018.

But last December, the United States said it was ending its participation in negotiations on the compact. A statement from the U.S. Mission to the United Nations said numerous provisions of the declaration were "inconsistent with U.S. immigration and refugee policies" under President Donald Trump.

Louise Arbour, the U.N. special representative for global migration, said the compact is a framework "to eliminate unsafe, disorderly migration" and an agreement among nations to cooperate. She said most countries agree that well-managed migration produces good results.

She said the major hurdle was addressing "illegal migration" because many countries just want migrants to go home.

She said references to "illegal migrants" are pejorative, noting that people who don't pay taxes aren't called "illegal taxpayers." She stressed that the compact refers to "irregular migrants" and said that such people should never be criminalized.

Hungary's Szijjarto said his government disagreed with the compact's basic approach of portraying migration as "a fundamental human right, which we don't think it is."

The compact has 23 objectives that seek to boost cooperation to manage migration and numerous actions ranging from technical issues like the portability of earnings by migrant workers to reducing the detention of migrants.

Guterres called the agreement "a significant achievement." At a news conference Thursday, he stressed the contribution of migrants to the global economy, calling them "a remarkable engine for growth."

According to a U.N. estimate, there are 250 million migrants around the world. And a McKinsey study cited by Guterres said that "they make up 3 percent of global population but contribute 10 percent of global gross domestic product."

Arbour, who is secretary-general of the high-level meeting in December, said it will not only formally adopt the agreement but hopefully spur action to implement it including by governments, the private sector and "a much, much broader constituency" throughout the world.