The Trump administration’s decision to begin taking migrant children from their parents at the border is an especially cruel policy. It can also be seen as part of a broader anti-immigrant backlash across the Western world, with countries as diverse as Britain, Italy, and Poland pushing for harsh new crackdowns on the rights of foreigners to enter.

The government whose policies most resemble President Trump’s is Hungary, where right-wing Prime Minister Viktor Orbán has made controlling migration the raison d’etre of his political career. Orbán, who has been in power since 2010, just won “reelection” on the strength of his pledge to fight what he describes as a foreign plot to infiltrate and destroy Hungary through mass migration.

One of the hallmarks of Orbán’s response to the migrant crisis has been its sheer cruelty, to a degree that gives even Trump a run for his money. Hungary has built not one but two fences on its southern border with Serbia — with the express aim to cut off a common route refugees use to enter Europe. In one 2015 incident, when several asylum seekers tried to get through the fence, Hungarian riot police fired water cannons and tear gas at the crowd, which included children.

Asylum seekers of all ages who actually make it across the border are detained in camps policed by armed guards and ringed with barbed wire. Human Rights Watch has documented instances of guards beating asylum seekers and then posing for selfies with their victims.

The goal of the Hungarian government’s cruelty, much like Trump’s, is to make migration as unpleasant as possible — to deter non-Hungarians, and particularly nonwhite and Muslim immigrants, from entering. Orbán is quite clear about this in his speeches: Migrants from Africa and the Middle East pose an existential threat to Europe’s white Christian identity and must be kept out.

“Europe is now under invasion,” Orbán said in a March speech. “Those who don’t block migration at their borders will be lost. Slowly but surely they are consumed.”

In a series of tweets on Monday morning, Trump made arguments that were strikingly similar to Orbán’s. He blasted European leaders for admitting “millions of people in who have so strongly and violently changed their culture,” arguing (falsely) that immigration had caused a spike in German crime rates. He cited this (made-up) crisis as explicit justification for his own harsh immigration crackdown:

We don’t want what is happening with immigration in Europe to happen with us! — Donald J. Trump (@realDonaldTrump) June 18, 2018

The specifics of the Trump and Orbán policies — family separation versus barbed wire — are different. But the similarity of the justification, that notion that more immigration must be deterred at all costs, reveals something important about what Trump is currently doing. These harsh measures are an inevitable outgrowth of the way that Trump and other right-wing populists like Orbán position migrants as a dire threat to the societies they’re trying to join.

Cruelty isn’t ancillary to the Trump approach to immigration. It’s at the heart of it.

The vicious logic of family separation

Trump and Orbán are perhaps the two most important leaders in the global anti-immigration movement today. They eschew the kind of politeness heads of state are supposed to use when talking about immigrants, instead attacking them as people. Both men frequently describe immigrants as risks to the safety of their respective nations — and, sometimes, even their very survival.

The exact nature of the threat varies by context. Orbán, dealing with large numbers of Muslim migrants, plays up fears of terrorism and the demise of “Christian” culture. “Every single migrant poses a public security and terror risk,” as he put it in a 2016 press conference.

Trump used the same arguments about terrorism to justify his travel ban. But when dealing with largely Mexican and Central American migrants rather than Muslims, he plays up the threat of crime. The most famous example, of course, is the speech he gave at the opening of his campaign way back in 2015:

The US has become a dumping ground for everybody else’s problems. ... When Mexico sends its people, they’re not sending their best. They’re not sending you. They’re not sending you. They’re sending people that have lots of problems, and they’re bringing those problems with us. They’re bringing drugs. They’re bringing crime. They’re rapists. And some, I assume, are good people.

Like Orbán, Trump has described the stakes here as being existential: that preventing mass migration, particularly undocumented migration, is a matter of life and death for the United States. “If you don’t have Borders, you don’t have a Country!” he tweeted on Tuesday (capitalization his).

The default assumption here isn’t that immigrants are normal people who might unintentionally harm native-born citizens by working for lower wages. It’s that the bulk of them are dangerous, distinct from native-born citizens in character and in kind.

The migrants at issue in the current American and Hungarian debates don’t resemble this caricature in the slightest. It’s actually somewhat the opposite: Many of these people are destitute and desperate, fleeing poverty, gang violence, or war.

Now, intentionally inflicting horrors like family separation on people might seem impossibly cruel. But if you believe the stakes of the immigration fight are so high, that the very identity of the immigrants is so threatening that the country might not survive their influx, then extreme cruelty becomes not only justified but required.

Orbán has been explicit on this point, as has (more or less) Attorney General Jeff Sessions. In a Monday speech, he defended the Trump administration’s “zero tolerance” policy as a “terrible choice” justified only by the “lawlessness” on America’s southern border. Were there fewer immigrants trying to enter, Sessions said, there wouldn’t be any need to break up families.

“We cannot and will not encourage people to bring children by giving them blanket immunity from our laws,” he said. “If we build the wall, if we pass legislation to end the lawlessness, we won’t face these terrible choices.”

You can find similar language — that migrants are a dire threat who must be met with extreme measures — in countries across Europe. Matteo Salvini, Italy’s interior minister and the leader of its far-right party, has blamed immigrants for “drug dealing, thefts, rapes and violence,” and proudly labeled Italy “the racist country.” French far-right politician Marine Le Pen, warning that French “civilization” was at stake, called last year for a suspension of all immigration to France. Orbán has explicitly cast himself as part of a pan-Western alliance of anti-immigrant politicians, one that could work together to slam Europe’s doors shut.

Under President Obama, the United States was seen as an enemy of this so-called “nationalist international” and an ally of politicians like German Chancellor Angela Merkel trying to hold the pro-migration line. Under Trump, we have scaled back that commitment — and then some. With the rise of family separation, the United States is actually innovating on European anti-immigrant politics.