RCMP officer looks on as a woman carrying a child waits to cross the U.S.-Canada border.Chris Wattie / Reuters

If you want to understand why Canada’s immigration system works, and why its immigration rate has generated so little political backlash despite being so much higher than America’s, take a look at the surprising nuances of Canada’s immigration policy. That policy may be softer-hearted than America’s, but it’s also harder-headed. Surrounding the Canadian welcome mat is a bed of nails.

Canada’s immigration success thus far is not a liberal story or a conservative story—it’s both. If the country’s image appears to be entirely liberal, that’s largely because its methods of controlling immigration are simply quieter, subtler, and less obvious than America’s. It’s that commitment to policing immigration that has, paradoxically, sustained such high levels of support.

Since the late 1980s, Canada has consistently been a high-immigration country, at least relative to the U.S. As a result, the proportion of Canadians born outside the country hit 21.9 percent in 2016. That same year, America’s foreign-born population was 13.4 percent. That’s a record high for the U.S.—but it’s been 115 years since Canada’s foreign-born population was at such a low level. As Derek Thompson put it in his article analyzing how Canada has escaped the “liberal doom loop,” Canada’s floor is America’s ceiling.

So why has Canada managed to sustain popular acceptance and cross-party support for so much legal immigration? For one thing, the movement of people into the country has generally been so law-abiding and orderly as to be uncontroversial and barely newsworthy. Canada, unlike the U.S., is a country where nearly all arrivals come in through the front door, in the open, during daylight hours.

Almost everyone who immigrates to Canada has to first apply from overseas, and before they’re granted entry they’re subjected to extensive vetting by Canadian authorities. Those who make the cut have to wait months or years for their turn in line before being let in. Over the past 20 years, about 5 million immigrants chose Canada. But the vast majority only entered the country after Canada also chose them.

As for illegal and irregular immigration, Canadian governments from both ends of the political spectrum have worked—quietly—to ensure there is as little of it as possible. The unspoken underpinning of Canada’s otherwise welcoming immigration policy is a giant and assiduously maintained border wall.

Wait, what? Yes, Canada has a border wall—in a sense. In fact, it has five of them. Four are geographic, the fifth is bureaucratic. All have been extremely effective in sustaining the legitimacy and popularity of Canada’s immigration policy.

Three of the walls are the dumb luck of geography: the Atlantic, Pacific, and Arctic oceans. You can cross the Aegean from Asia to Europe in a dinghy, but unless you can get your hands on a ship and a crew trained in navigating thousands of miles of difficult water, you aren’t sailing to Canada. So far in 2018, Canada has received exactly 10 asylum applications at sea ports.

The fourth wall is Canada’s southern border with the U.S. The world’s leading economy has historically been a magnet for people, not the reverse. In the late 19th and early 20th century, the volume of emigrants from Canada to the U.S. was at times so high that Canadians actually feared for the future of their country. The strength of the American economy long meant that few immigrants would think to use the U.S. as a back door into Canada.

The fifth wall is the bureaucratic barrier that Canadian governments, both Conservative and Liberal, have meticulously maintained to cover any gaps in the other defenses.

Toronto’s Pearson International Airport is one of North America’s busiest hubs, with direct flights from nearly every continent. But if you want to come to Canada, it’s obviously not as simple as buying a plane ticket. Visitors from a long list of countries need to apply in advance for a visa, and if they’re coming from a place that has recently sent Canada more than a certain number of asylum applicants or vacation over-stayers, that visa may suddenly become difficult to get. And without a visa, the airline won’t let you on the plane.

Even under the government of Prime Minister Justin Trudeau, that bureaucratic wall isn’t coming down. Quite the contrary. In 2012, Canada rejected 18 percent of the more than 1 million foreigners who applied for a visitor’s visa; by 2017, the number of visa applicants had climbed to nearly 2 million, and the rejection rate had risen to 26 percent. In the first three months of this year, it rose again, to 30 percent. Similarly, 33 percent of applicants for a student visa were rejected last year. And more than 75 percent of visa applicants from countries such as Somalia, Yemen, Afghanistan, and Syria were turned down. The Canadian government’s aim is to discourage anyone from trying to permanently relocate to Canada by anything other than regular, legal means.

Despite Canada’s open-door reputation, the country has some of the world’s most restrictive visa rules. A World Economic Forum survey of travel and tourism professionals ranked Canada among the worst in the world—120th out of 136 countries—for the restrictiveness of its visitor visa requirements. It’s a quiet but effective means of preempting irregular immigration.

Yet there’s a place where Canada’s immigration system isn’t working, and from whence a backlash has been building. That place is Roxham Road, a quiet rural street that dead-ends in upstate New York, a few feet from the Canadian border. Over the past 18 months, thousands of people have walked across the frontier from the United States to Canada and claimed asylum.

If my country’s pro-immigration consensus is ever to come undone (something I hope can be avoided), this is where it’s going to happen. The whole apparatus of bureaucratic dissuasion can be circumvented by anyone who is already in the U.S. and is willing to simply walk into Canada at any random spot along the world’s longest undefended border. Typically, that means taking a bus to Plattsburgh, NY, followed by a short taxi ride up Interstate 87 to the Canadian border.

Someone who tries to cross at the official Canadian border post at Lacolle, Quebec, without the necessary documents and permissions, even someone claiming refugee status, will be returned to the U.S. That’s because, as part of a Safe Third Country Agreement between the two countries, Canada deems the U.S. to be a country where a refugee claim will be honestly assessed and fairly adjudicated.

But if your taxi, instead of going to the official border, drops you off a few miles away, where Roxham Road’s northern progress hits its dead end, it will be a very different story. It’s just a few easy steps from where the street ends in the U.S. to where it restarts on the Canadian side. And the Safe Third Country agreement doesn’t apply to unofficial border crossings. Once someone is physically in Canada, all they have to do is present themselves to the Canadian authorities and declare that they wish to make a refugee claim. It’s an end run around Canada’s bureaucratic border wall.

In 2017, the number of asylum claims filed in Canada doubled from the previous year to 50,000. Nearly 20,000 of those asylum claims were made in Quebec, the vast majority at or as a result of Roxham Road. Between January and May, there were just shy of 22,000 asylum claims made in Canada. The trend was started last year by people, notably Haitians, who feared that President Trump might deport them, but it has since evolved to include many others, notably Nigerians who appear to have traveled to the U.S. for the purpose of reaching Roxham Road.

According to Canadian and international law, Canada has to give a full hearing to anyone on Canadian soil who claims they are a refugee fleeing persecution. If their refugee claim is accepted, Canada will give them permanent residency and eventually citizenship. However, the process of determining whether someone is or is not a refugee can take years. While their cases are being adjudicated, Canada releases most border-crossers into the population, giving them social assistance and free medical care and allowing them to work, legally.

It’s a sensible and humane system, but it risks breaking down if too many people use it. It also creates perverse incentives. Lengthy delays in processing claims, combined with the ease of entering the asylum system, means a refugee claim made on Canadian soil is a backdoor way for an economic migrant to spend a few years, possibly many years, legally working in Canada.

Canada’s immigration consensus isn’t yet broken, but thanks to Roxham Road, it’s visibly fraying. This spring, the Quebec government, which had at one point housed arrivals in Montreal’s Olympic Stadium, said that it could not support any more refugee claimants, and asked the federal government to start sending some of them elsewhere. In Toronto, where some arrivals are being accommodated in college dorms that have to be made ready for students in a few weeks, and where the city threatened to close some community centers to make them available for asylum seekers, the mayor has been begging the federal government for more money. And last week, the Ontario premier, Doug Ford, said that “this mess was 100 percent the result of the federal government,” so Trudeau should bear the full responsibility for dealing with it.

Regular immigration to Canada is unobtrusive and orderly, but the crossings at Roxham Road are neither. The phenomenon of people just showing up at the border feels to many Canadians like queue jumping. It also leaves the impression that the immigration system is out of control. In a country that makes a constitutional motto of “peace, order, and good government,” and that jokes about waiting politely in line being a core Canadian value, things that look like disorder or lawlessness tend to upset folks.

Mixed in with Canada’s long history of welcoming immigration policy is another long history: that of Canadians freaking out over small numbers of people trying to make an end run around the border walls. For example, over a period of 10 months in 2009 and 2010, two ships carrying a total of 568 refugee claimants from Sri Lanka were intercepted off the coast of British Columbia. The number of passengers was lower than the number of people who legally immigrate to Canada every day. Yet the arrival of the ships had the government, the media, and a good chunk of the population in an uproar.

Now, too, Canada is experiencing a moment of uproar, as another influx of unscheduled newcomers threatens the pro-immigration consensus. The number of asylum seekers who have crossed the border at unofficial sites isn’t that large when set against the country’s plan to take in more than 300,000 immigrants this year. But the issue isn’t just how many are coming. It’s how they’re coming.

Americans who romanticize the country to the north as a kind of liberal kingdom are missing part of the story. Canada maintains its open-door reputation because it has generally been very selective about whom it allows to approach the door in the first place.

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