It’s September 7, 1907, and a parade has just started on Main Street, just outside Vancouver’s City Hall, with hundreds marching to the tune of “Rule Britannia.” The song was a strange choice, given that the protesters were actually objecting to Britain’s rule, which had recently told the province of British Columbia to stand down when it tried to get tough on Asian immigration.

By the time the group reaches Chinatown, it degenerates into a riotous mob of several thousand angry individuals, armed with “For a White Canada” pennants and the righteous anger that comes from watching the Lieutenant-Governor burned in effigy. It was the beginning of a two-day terror campaign against residents of Chinatown and “Japtown,” the latter of which endured the brunt of the hostility and suffered the most damage.

Some blamed the United States, since “anti-Oriental riots” seemed to be spreading northwards along the Pacific coast. Bellingham, Wash., for example, had seen white mob violence against “Hindoos” (in fact, Sikhs, but “Hindoo” was at the time a common catch-all phrase used by American media to refer to South Asians), which drove refugees across the border and into British Columbia. In 1907, the Globe and Mail reported that these were followed by about 30 white supremacists who immediately began agitating. It wasn’t likely that Vancouver residents needed much help channeling their anger: Between the aftermath of the financial panic of 1907, a recent uptick in Japanese immigration, and the new refugees, the locals were eager to demonstrate they weren’t willing to play “sanctuary city.”

Fast-forward a century-plus and it feels as if time might, indeed, be a flat circle. Across Canada, border towns are already experiencing an influx of asylum seekers fleeing the United States—on foot. In America, white nationalism has re-emerged amid recent “Go-back-to-your-own-country” shootings in Washington state and Kansas; in Canada, too, hate crimes—including mosque shootings, anti-Muslim rallies, swastikas on prayer houses, sidewalks and in universities—appear to be on the rise.

Although there’s an important historical connection between our immigration policies and those in the United States (we’ll get to that), white supremacy isn’t something we need to import. Not now. And not back in 1907, either, when we had our own, rich history of white nationalism to draw upon. Canada had established a discriminatory Head Tax on Chinese immigrants in 1885, making Yellow Peril official policy. Less than two years later, an angry mob torched a Chinese/Canadian camp near Vancouver’s Coal Harbour. Terror acts like that, plus the 1907 incident, might’ve been perpetrated by rogue groups of radicalized white nationalists frustrated by financial hardship (and, in all likelihood, hopped up on too much whisky) but, in fact, their actions generally reflected the state’s position.

So too does contemporary white mob violence trickle down from America’s official immigration policies, both of which paint Latin Americans and Muslims as security risks. In 1902, for example, a Royal Commission declared Asians were “unfit” for Canadian society and a “danger” to national security. After the 1907 Vancouver riots, the federal government concluded that the Chinese were responsible for the scourge of vice—mostly drugs and prostitution—a discovery that justified further restrictions on Asian immigration. One measure, the 1908 Continuous Journey Regulation, required immigrants arrive directly from their country of origin—with no stopovers—a devious rule designed to make immigration from distant regions next-to-impossible. The most well-known victims of this were the Punjabi passengers on board the S.S. Komagata Maru (which set out from Hong Kong but stopped in Shanghai and Yokohama) who weren’t allowed to disembark in Vancouver. After being confined to the ship for two months, the Maru was sent to India, where the “agitators” were arrested. Nineteen were shot.

Why didn’t Canada just ban Asian immigration outright? That was, after all, what the United States did in 1882 with its Chinese Exclusion Act—the first historical precedent for today’s “Muslim ban” that refuses immigrants from specific countries.

Well, the reason for Canada’s middle-of-the-road racist immigration policies can be summed up in two words: Rule Britannia.

As part of the Commonwealth—a global empire—immigration in Canada was complicated by a range of obligations and considerations. Consider the Sikhs, many of whom were veterans of the British army before they settled on the west coast of Canada. Also, friendly trade relationships with Japan, China and India had to be maintained and, as such, after every international incident, diplomats and dignitaries went into damage-control mode—literally, in the case of the 1907 riot, since the federal government promised to pay for repairs to property in Vancouver’s Japantown.

In 1923, however, after 40 years of trying to solve trade issues and immigration anxieties through a balance of systemic discrimination and foreign diplomacy, Canada gave up its moderate approach to racism and instituted its own Chinese Exclusion Act—effectively a total ban. The “White Canada Forever” groups surely celebrated it as their own victory but, in fact, much credit was due the Americans, who had been pressuring Canada to enact a ban for years, citing “back-door” Chinese immigration through the porous border. The claim was that immigrants paid the “head tax” in Canada, then promptly migrated east and crossed into the United States from Ontario or Quebec. To keep the flow of traffic and trade moving quickly across the border, Canada gave up a little sovereignty—not to mention dignity—and adopted the draconian total American ban.

Although Trump’s second travel ban against what is now six majority-Muslim countries has already been stayed by at least two federal judges, a debate over our “porous border” in the light of American crackdowns and deportations is inevitable. It’d be smart to do some thinking ahead of time about how much we’re willing to give up for pre-clearance and other measures that keep borders friendly and trade flowing. Bill C-23, for example, which would give U.S. border guards more power to interrogate Canadians on our soil, is looking a lot less appealing now than during its first reading, given that America’s Department of Homeland Security is now openly hostile to both foreigners and those who seem like they might have foreign-ish values—like Muhammad Ali Jr., the son of an American icon, or a group of volunteer relief-workers from a Hamilton church.

Hindsight, as they say, is 20/20. “Yellow peril” appears absurd to a modern reader, and turning our back on our global obligations for the sake of U.S. trade relations—it seems clear in the light of the present—was an obvious error and egregious abuse of human rights. But these days, we are having something of a Chamberlain moment: in the choice between a free-and-easy border and our obligations to refugees and Latin trade partners, it’s time to choose the latter.

Intolerance and discrimination aren’t cross-border imports. But willingly opening our borders to white nationalism would put us on the wrong side of history—again.