A Canadian police officer greets a family from Haiti at the U.S.-Canada border.Christinne Muschi / Reuters

In one sense, the Trump administration’s actions against migrants fleeing violence and deprivation in Central America have made the United States a glaring global outlier.

“The U.S. is the only country I know of that has experimented on any kind of serious scale with deliberately detaining children as a deterrent to their parents,” said David FitzGerald of the Center for Comparative Immigration Studies at the University of California San Diego. He was referring to the government’s now-reversed practice of separating kids from parents facing criminal prosecution for entering the United States illegally. (When it comes to those seeking asylum from persecution, as many Guatemalans, Hondurans, and Salvadorans have been in the United States, countries typically keep families united and may not detain them so long as parents post a bond or can be monitored by the government while their cases are resolved. The United States has also experimented with solutions like this, though the Trump administration has favored housing migrants in detention centers.)

But more broadly, in wrestling with how to deal with unauthorized migration and particularly a surge in asylum-seekers at the border in recent years, the United States has plenty of company around the world. “Everybody’s struggling with this,” said Theresa Cardinal Brown, an immigration expert at the Bipartisan Policy Center.

When I asked immigration experts this week which country is the shining example of how to handle asylum-seekers—where, in other words, the United States could look for best practices—some said Canada, others Sweden. But I didn’t hear many unequivocal endorsements.

Absorbing asylum-seekers has been a challenge ever since the United Nations developed a convention on refugees in 1951. But, according to FitzGerald, “it hasn’t been as big of a challenge in the countries that dominate the world until more recently”—a period in which more people are displaced than at any time since the wake of World War II.

There’s long been a “grand bargain … between the rich countries of the Global North and the poorer countries of the Global South,” FitzGerald explained: “The Global North pays for refugees to be housed in other countries in the Global South and in return takes a symbolic number of them through refugee-resettlement programs.” But lately that bargain has broken down as a substantial number of asylum-seekers have gotten past the “obstacle course that’s deliberately been put in their way” and requested refuge on the territory of wealthy countries. “People are trying to reach Europe, trying to reach Australia, trying to reach North America,” he observed. And nobody in Europe and Australia and North America has quite figured out how to respond.

In Europe, officials have sharply reduced an influx of unauthorized Middle Eastern and African migrants and asylum-seekers from hundreds of thousands in 2015 to tens of thousands today by essentially “stopping the flow before it reaches European shores,” according to Solon Ardittis of the U.K.-based research company Eurasylum. The European Union has poured billions of euros in financial aid and technical assistance into countries that these migrants have come from and traveled across, including Turkey and several African nations such as Ethiopia and Mali.

The good news is that these countries of origin and transit have become partners in policing borders, combating human-smuggling operations, offering would-be migrants economic opportunities, and taking back migrants who don’t qualify for asylum in Europe. The European approach of striking migration deals with upstream nations is “fully replicable” in the United States, Ardittis said, though it might require, say, better relations between the Trump administration and the Mexican government than exist at the moment. (“Who’s going to build the Wall?”)

While the United States since the Bush administration has worked with Mexico and Central American nations to stop unauthorized migrants before they reach the U.S. border, the Trump administration has not devoted serious resources to helping “prevent people from leaving in the first place” by creating the economic and security conditions that make them think, “‘Yeah things are pretty lousy here, but a new factory is opening up, there’s some more opportunity for [job] training, the state is a bit more powerful and it’s protecting us better than it used to protect us,’” said Demetrios Papademetriou of the Migration Policy Institute. (Instead, the Trump administration has proposed cutting foreign aid to Guatemala, Honduras, and El Salvador.)

The bad news about Europe’s approach, however, is that this means “the outsourcing of the EU’s border-security strategy to third countries with a potentially poor human-rights record and an often discretionary use of rule of law,” Ardittis told me, raising concerns “about the European Union’s wavering observance” of its “fundamental values.” And that outsourcing has stemmed in large part from EU member states failing to agree on a method of distributing migrants across the bloc, and from European leaders contending with the populism and political extremism that has emerged in reaction to the challenges of integrating newcomers.

Italy’s new populist leaders, for example, have closed their ports to rescue ships carrying hundreds of migrants, including minors, leaving the vessels adrift for days in the Mediterranean until other European countries have finally agreed to accept them. In Germany, Chancellor Angela Merkel’s governing coalition is currently on the verge of collapse over an internal dispute about whether to turn away at the border migrants who have previously pursued asylum in other European countries. (At a summit in Brussels on Friday, European leaders agreed to beef up border controls and to set up asylum-processing centers in EU states and potentially in North Africa.)

FitzGerald cited Sweden, which in 2015 took in more asylum-seekers per capita than any other European nation and now has a foreign-born population that percentage-wise exceeds that of the United States, as a model. Sweden, he said, has struck a “balance of keeping track of people—registering people, knowing exactly who they are, where they’ve lived—and at the same time making it possible for people to get along at a basic level of subsistence—for example, by working—while their asylum case is being adjudicated. … If the Swedes can do it even though they’ve had this massive ramp-up from being a pretty ethnically homogenous country … you would think Americans should be able to do it given that we’re a self-described nation of immigrants and we’ve had a lot of immigration for a long time.” Yet even Sweden has adopted more restrictive immigration policies since 2015, and politicians are now calling for stricter rules ahead of an election in which gang violence and migrants’ struggles to learn Swedish are prominent issues.

In Australia, meanwhile, Trump’s harsh, zero-tolerance border policies have reminded many of their own country’s policy of rejecting or detaining indefinitely on Manus Island and Nauru all unauthorized migrants and asylum-seekers, including family units and children, who journey to Australia by sea. As the Australian Prime Minister Malcolm Turnbull told Donald Trump during a private phone call last year, “in order to stop people smugglers, we had to deprive them of the product. So we said if you try to come to Australia by boat, even if we think you are the best person in the world, even if you are a Nobel Prize winning genius, we will not let you in.” The United States “should do that too,” Trump responded. “You are worse than I am.”

Canada, by contrast, is “hands down” the exemplar of how to accommodate asylum-seekers and unauthorized immigration since it “plays pretty much … by the [international] rules” of how countries are supposed to manage such flows, according to Papademetriou. As Audrey Macklin of the University of Toronto recently wrote, “Canada does not prosecute asylum seekers for illegal entry. Canada does not have a policy of separating children from parents. In fact, the Canadian government is moving away from detaining migrant families at all.” Migrants receive shelter, healthcare, and free public education for their kids while their asylum claims are sorted out.

Papademetriou spoke admiringly of the government’s use of a politically independent immigration and refugee board to decide asylum cases; its practice of forward-deploying officials to countries that have begun sending significant numbers of migrants to Canada in order to provide technical assistance that can reduce the outflow; its hefty investments in helping newcomers learn the local language and enter the labor force; and its careful calibration of policies to maintain public approval of its immigration system. “Canada is the only country I know of that has always had—going back 30, 40, 50 years—majority support for their immigration system,” he noted.

One advantage that Canada has over the United States is that it can flexibly adjust immigration policies in response to dips in public support. The immigration minister has considerable discretion to tweak those policies, and the Canadian political system affords the prime minister majority support in parliament. The American immigration system, in comparison, is more dependent on statutory guidelines and action by a divided government.

The United States has not witnessed “a substantive change in our legal immigration system in 30 years,” Brown noted. “Our process for how we treat people arriving at the border has not changed since” the 1996 Illegal Immigration Reform and Immigrant Responsibility Act. When Central American asylum-seekers, including whole families and unaccompanied children, suddenly started showing up at the U.S. border in 2014, she said, it “overwhelmed the processes that we had developed to deal with migration along the U.S.-Mexico border, which were primarily set up when the vast majority of people we were apprehending were Mexican men who were coming for work” and who could relatively easily be sent back across the border. Brown advocates improving these outdated processes by, for example, hiring more immigration judges and establishing more immigration courts to speed up asylum decisions.

But Canada’s success is at times linked to cold calculations by its leaders, such as when Stephen Harper’s government imposed visa requirements on Mexican and Czech citizens in 2009 to counteract an uptick in Mexican and Roma asylum-seekers. While these policies were later reversed, Prime Minister Justin Trudeau is currently facing another potential reckoning. Since Trump’s election, Nigerians with U.S. tourist visas and Haitians concerned about losing their temporary residence status in the United States have been entering Canada and asking for asylum, creating a backlog of tens of thousands of cases. A government-commissioned report concluded this week that Canada’s refugee system is buckling under the strain of this surge in claims and warned that lower-skilled economic migrants might be exploiting the asylum process as a means of entering a country that prioritizes high-skilled immigration.

“The best thing that happened to Canada was that [the United States was] between the rest of the world and Canada,” Papademetriou told me, referring to the fact that Canada’s only land border is with the U.S. “The worst thing that is happening to Canada now is that people are using [the United States] to try to get to Canada.”

Canada’s geographic position also attests to the limits of its lessons for the United States. Unlike Canada, the U.S. is among a small set of countries that has a long land border with a much poorer country, FitzGerald pointed out. Other nations in this category, including Russia, South Africa, and India, also confront large flows of unauthorized migration. And relative to them, he said, the United States actually has more humane immigration policies.

Where all countries “fall flat,” Papademetriou noted, is in their “ability to remove” unauthorized migrants who don’t qualify for asylum but don’t want to leave voluntarily—a particularly sensitive issue in Europe given the legacy of the Second World War. (Hence why the German government revealed in 2016 that over half a million people whose asylum applications had been rejected were still living in the country.) And yet “removal, [like] border controls, is the sine qua non in running a system that your society accepts as fair but at the same time robust. It will follow the rule of law, but it is not going to be taken advantage of.” Canadian leaders are well aware of this, he added: “Nothing undermines the trust that allows the government to actually be open and protect people ... than the evidence that you have been taken advantage of.”

What makes good asylum policy so difficult to devise, Papademetriou said, is that the government has to do “a lot of things well”—from establishing fair and efficient ways to judge asylum claims; to following firm procedures to deport those who don’t qualify; to pursuing a foreign policy that encourages countries of origin and transit treat people better, to ensuring that those who are admitted into the country integrate into society and flourish. And right now, with the world’s most desperate people on the move from the Mediterranean Sea to the Pacific Ocean to the Rio Grande, there simply aren’t a lot of countries doing a lot of things well.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.