MARRAKECH, Morocco (AP) — Seeking to remind the world that migrants are people, too, a U.N. migration conference ended Tuesday with pledges to put a landmark new accord to work, but it left unfinished business on ending the divisive debate between nationalists and globalists as migrant detention centers, caravans and deaths at sea or in deserts make headlines.

U.N. officials and governments touted the adoption of the Global Compact on Migration by 164 countries a day earlier, but with signs that it was already fraying and still the source of disgruntlement from populist, right-wing politicians who see the call for global cooperation as a threat to national sovereignty.

The agreement is a sort of one-stop-shop to bring together existing, and disparate U.N. agreements that touch on migration. It is rich in lofty — if ill-defined and uncertain — ambitions typical of U.N. technocracy: Its top officials trumpeted a new "network on migration" and a "startup fund" linked to the U.N. migration agency.

They envision a regular check-up on implementation of the pact every four years, starting in 2022.

Nasser Bourita, foreign minister of host country Morocco, said simply: "We don't want this compact just to be ink on paper."

Officials will be at pains to entice back countries like the U.S., Italy, Australia and Hungary that shunned the accord — and stem any further defections. Brazil's newly elected populist government said the Latin American country will pull out in January.

The U.N. General Assembly will meet Dec. 19 to formally endorse the pact, and opponents who stayed away in Marrakech could voice their concerns there.

U.N. officials aren't giving up hopes of getting them on board.

"This is not take it or leave it. I understand that people are a bit puzzled about the expression 'compact,'" said Louise Arbour, a Canadian jurist who was the U.N. secretary-general's point person at the conference and has sought to dispel "false" information alleging it will force nations to change their laws. She said it builds on existing agreements.

"It does not start from scratch," she said. "If you look at the 23 objectives of the pact ... (take) combating trafficking and smuggling, that's actually the object of international conventions that are already in place."

The accord culminates two years of work authorized unanimously by all 193 U.N. member states, including then-President Barack Obama's administration. President Donald Trump pulled the U.S. out last year. In recent months, nationalist movements have fanned vocal criticism of the accord — part of it "fake news" bluster, U.N. officials insist.

The compact wants to reduce discrimination toward migrants, reap data about how people move, broaden use of government-backed internet portals to help migrants, and give training and education to migrant women, among other things. It wants detention of migrants to be seen "only as a measure of last resort."

Defenders note that migrants are people and deserve recognition and defense of their human rights. They have played up the economic benefits to rich countries with aging workforces and to poor countries through remittances of cash by migrants who send money back home.

Opponents often fear an influx of migrants can dilute their countries' character, import poverty or crime, reduce wages and take jobs from tax-paying citizens.

Arbour called the accord a "framework" and a "joint exercise" that epitomized multilateralism at its best.

But the pact has stirred political tensions across Europe, and prompted sparring in France's parliament Tuesday.

One lawmaker from France's far-right National Rally party denounced backers of the migration compact as "traitors of Marrakech" while another from President Emmanuel Macron's centrist party decried misinformation on social media implying the pact would force France to take in masses of migrants.

But Brazil's incoming foreign minister, Ernesto Araujo, said Latin America's biggest country would withdraw from the compact after right-wing President-elect Jair Bolsonaro takes office Jan. 1. Araujo tweeted the reason was "because immigration cannot be dealt with as a global issue, but according to each country's reality and sovereignty."

___

Associated Press writers Amira El Masaiti in Marrakech, and Angela Charlton in Paris, contributed to this report.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.