The United States and Hungary alone opposed the adoption on Monday in New York of a new global compact to strengthen international cooperation on large movements of refugees, help them thrive in exile, and ease the strain on major - often relatively poor - host countries.
This month sees the adoption of two historic agreements to share responsibility for refugees and cooperate on migration.
The compacts were mandated by the New York Declaration for Refugees and Migrants, a landmark September 2016 agreement. But, more than two years later, the resulting Global Compact on Refugees and the parallel but separate Global Compact for Safe, Orderly and Regular Migration are being born into a different and more hostile political environment.
We explain what the compacts are, parse the heated political rhetoric, and speak to experts about how the agreements might improve the lives of millions of vulnerable people around the world.
More than 180 UN member states voted in favor of the deal to help the more than 25 million refugees who have crossed an international border in search of safety from war, persecution, or violence. The Dominican Republic, Eritrea, and Libya abstained.
Describing the agreement as "historic", Filippo Grandi, the UN high commissioner for refugees, tweeted: "It is the biggest effort to broadly share refugee responsibilities that I have witnessed in 34 years of work with refugees."
Its adoption came with far less fanfare - and less opposition - than the landmark migration deal agreed a week earlier by 164 nations at a gathering in Marrakech, Morocco. Like the migration compact, the refugee deal is not legally binding, and it is up to member states to decide how and whether to implement it.
What is the refugee compact?
The Global Compact on Refugees begins with the premise that "the predicament of refugees is a common concern of humankind", and says it "intends to provide a predictable and equitable burden- and responsibility-sharing" in response to both new and protracted situations of human displacement.
The agreement has four main objectives: easing pressure on refugee-hosting countries; enhancing refugees' self-reliance; expanding refugees' access to so-called "third countries" through formal resettlement and other legal avenues; and supporting conditions in refugees' countries of origin to ensure safe repatriation.
It consists of two parts: a Comprehensive Refugee Response Framework (CRRF) that is meant to "operationalise" the compact at the ground level based on best practices; and a Programme of Action that sets guidelines for the international community more broadly.
Several CRRF "pilot projects" have been underway for more than 18 months in refugee contexts from Central America to Somalia, from Afghanistan to Uganda. The goal is to take a "whole of society" approach to refugee response that gets refugees out of camps and integrated into host communities.
The compact is meant to garner more investment from host and donor governments, as well as the private sector, and to encourage a more development-oriented approach from the onset of any new refugee crisis, as opposed to shorter-term humanitarian response.
Why is it necessary and how will it work?
As UNHCR's Assistant High Commissioner for Protection Volker Türk explained earlier this year, the 1951 Refugee Convention focuses on the rights of refugees and the obligations of states but it doesn't offer any guidance on international cooperation.
It "does not specify how you share the burden and responsibility, and that's what the global compact does," he said. "It responds to one of the major gaps we have faced for decades."
Nine in 10 refugees worldwide shelter in developing countries that struggle to provide key services like healthcare and education - for example in Turkey, the world's biggest host country with some 3.5 million refugees, most of whom are Syrian.
25 million refugees have crossed an international border in search of safety from war, persecution, or violence.
The compact aims to bring together a broader range of stakeholders to assist refugees: states and international aid organisations, of course, but also international and local civil society groups, development actors, the private sector, and - for the first time - financial institutions.
The World Bank, for example, has created a $2 billion fund to address the socioeconomic impact of refugee flows into low-income countries. Refugee aid has been moving in this direction for years, but the compact gives these partnerships more structure.
The compact also outlines how host countries can now "mobilise financial, material, and technical assistance" through a new Support Platform at the onset of a new crisis, to ensure cooperation between donors and host countries happens far earlier than up until now. It is to be activated or deactivated by UNHCR, with the support of donor and host states.
Will it make a difference?
The jury is still out on whether the compact will change much on the ground.
Countries and regions that have signed on to implement the CRRF - in effect a modus operandi of exemplary approaches - are making some progress. For example, Ethiopia has pledged to close all 27 refugee camps in its territory over the next 10 years and integrate residents into local communities. Chad, another CRRF roll-out country, has begun the process of nationalising its refugee-only schools, while Djibouti is helping refugees open bank accounts.
The first real assessment of whether the compact is working will come next year, when countries meet again for the first Global Refugee Forum. After that, they are to meet every four years, with midway meetings of senior officials every two years.
At each four-year meeting, compact signatories are expected to share their progress and make new pledges on financial assistance, resettlement, and other actions in support of the compact.
In a statement Monday, five international NGOs - the International Rescue Committee, Oxfam, Save the Children, the Norwegian Refugee Council, and the Danish Refugee Council - said the compact has the "potential to provide better protection and care for refugees, and development benefits to hosting communities" so long as states hold themselves and each other accountable.
At the very least, the accord has created a blueprint for cooperation among stakeholders that previously worked together ad hoc.
How was it developed?
The compact came about in two phases over 18 months.
Last year was devoted to five broad thematic discussions on topics such as: examples of burden-sharing; how best to support host countries; and improving access to "solutions" such as resettlement or voluntary return.
From February to July of this year, six formal consultations were held in Geneva to improve a draft developed by UNHCR. The UN's refugee agency oversaw the consultations, which involved UN member states, international organisations, civil society, the private sector, and refugees themselves.
Experts and refugee advocates say that while the compact is indeed historic, it falls short of what was envisioned in the 2016 New York Declaration even as the number of people forcibly displaced hit a new record high this year of 68.5 million.
Nine in 10 refugees worldwide shelter in developing countries.
"It was conceived as an opportunity to advance responsibility-sharing and access to services and increased resettlement opportunities," said Mark Yarnell, a senior advocate and UN liaison at the non-profit Refugees International. "But then, given the political climate and global trend toward xenophobia, it's more about, 'Let's short up what we already have, and let's prevent further backsliding'."
The compact's development has come in fast-changing times.
Indeed, two years ago, all 193 UN member states signed on to the New York Declaration, which was championed by then-US-president Barack Obama. By comparison, the United States under President Donald Trump became the first nation to oppose the refugee compact. The Trump administration has also taken several steps to keep out refugees, such as cutting annual refugee admissions to just 30,000, compared to Obama's 110,000.
The result "is a very conservative document," said Kathleen Newland, cofounder of the Migration Policy Institute. "UNHCR's primary objective was to do no harm and not erode the protections that exist for refugees under the 1951 Convention."
Why the stronger reaction to the migration compact?
Unlike the migration agreement, which has been caught in a political firestorm, reactions to the refugee compact have been relatively tame. That's because this deal builds on the 1951 Convention Relating to the Status of Refugees and other international legal instruments covering refugee and humanitarian law.
Many of those agreements have been around for decades, and signatories must already offer certain legal protections to refugees. They didn't have the same existing obligations toward migrants, meaning that deal was essentially breaking more new ground.
Unlike the migration compact - an intergovernmental negotiation overseen by the International Organization for Migration and UN Special Representative for International Migration Louise Arbour - the refugee compact's development was led mainly by one agency, UNHCR.
And given the trend of governments pulling out of the migration deal, the UN's messaging in the lead-up to the adoption of the refugee compact also sought to distance it from its more controversial sister agreement and emphasise the differences between the two.
What are the criticisms?
Because the compact is non-binding, its successful implementation depends on "mobilisation of political will" - which the text explicitly calls for. That may be a tall order at a time when nations are militarising their borders, building walls, increasing detention, and forcing them back home prematurely.
"Governments have learned that they can ignore with impunity their obligations to refugees, with the UNHCR unable to hold them to account as a result of its dependence on states for funding and for its ability to operate in the field," writes Jeffrey Crisp, UNHCR's former policy chief.
Among the main criticisms are that the compact reinforces the unequal division of labour in worldwide refugee protection: richer countries give humanitarian and development aid and may agree to resettle a tiny percentage of forcibly displaced people, but poorer countries must still act as hosts for the bulk of them.
Others argue that it is a rich countries' agreement still intended primarily to protect their borders from unwanted refugees by buying off their responsibility with humanitarian aid.
"It's not perfect. It's a big compromise. There's still a lot to improve and validate, both in terms of implementation and the text itself. But it's relatively satisfactory compared to worries that were raised throughout the process," said Jerome Elie, senior policy officer on forced displacement for the International Council of Voluntary Agencies (ICVA), which coordinated more than 100 NGOs' contributions to the compact's development.
There are several omissions that humanitarian groups like ICVA pushed for.
For example, the compact makes little mention of those displaced within their own countries (internally displaced people, or IDPs) - well over half of the world's forcibly displaced people.
It also fails to offer any special protections for those displaced by climate change (though the migration compact does). And refugee women's rights advocates have noted its lack of special protections for women and girls, such as emphasis on sexual and reproductive health while in transit or exile.
Elie said the omissions were due to politics.
"Part of the reason for that is that the refugee compact is built on and is linked to a widely accepted treaty and is trying to operationalise it," he said. "Many states didn't want to go beyond that, and that's why UNHCR did not add climate change or IDPs."
Curiously, the refugee compact makes no mention of the migration compact, despite their shared history and areas of overlap. Groups like Refugee International have called for greater complementarity between the two agreements to avoid "protection gaps" and "so no one is left behind."
Although major host countries have broadly welcomed the refugee agreement, both Turkey and Bangladesh were outspoken during the development process that financial commitments - for the Syria and Rohingya crises respectively - must be fulfilled more quickly.