Immigrants sit on a border fence between the United States and Mexico after arriving as part of a caravan.Jorge Duenes / Reuters

Troops on the ground. Drones in the sky. Aggressive terror-related investigations in the United States. Donald Trump and Barack Obama differ significantly on style, but not much separates them when it comes to counterterrorism policy. Except, however, at least one issue: immigration.

The “migrant caravan” of Trump’s dark pre-midterm warnings has stopped short of the United States. Much of it now occupies a sprawling encampment of asylum seekers just over the border in Tijuana. Ahead of November’s congressional elections, the president repeatedly characterized the group as a national-security threat, at one point asserting the presence of “unknown Middle Easterners” that journalists on the ground could not corroborate.

As the border issue flared again in a combative press conference Trump held with Democratic congressional leaders on Tuesday, he threatened to shut down the government if lawmakers wouldn’t fund a border wall, asserting: “People are pouring into our country, including terrorists. We caught 10 terrorists over a short period of time.”

“We need a wall,” he added.

Trump is the first president of the post-9/11 era to so firmly link terrorism to immigration, says Peter Neumann, a professor of security studies at King’s College London who is writing a book about Trump’s counterterrorism policy. “I think this is the single most important difference between Trump and his predecessors—the extent to which he conflates Islam, immigration, and terrorism.”

Trump’s “10 terrorists” claim is drawn from Department of Homeland Security statistics from last year. The figures stated that an average of 10 individuals a day who showed up on terrorist watch lists were prevented from entering the United States by land, sea, or air. The numbers the president invoked to insist again on a wall at the southern border refer to stops at all borders—and they also show that the post-9/11 screening systems are likely already preventing suspected terrorists from entering the country.

Trump was drawing the connection between immigration and terrorism well before the migrant caravan became an issue. In the summer of 2016, shortly after Omar Mateen killed 49 people at a gay nightclub in Orlando in an attack that the Islamic State claimed responsibility for, Trump delivered a speech on “immigration, terrorism, and national security.”

Mateen was born in New York State after his parents left Afghanistan for the United States. Still, the then-candidate Trump said, “the bottom line is that the only reason the killer was in America in the first place was because we allowed his family to come here.” He went on: “We are importing radical Islamic terrorism into the West through a failed immigration system.”

The logic made a kind of intuitive sense. The perpetrators of the worst terrorist attack the United States has ever seen, which killed nearly 3,000 people on September 11, 2001, were all Middle Eastern nationals, most of them on tourist visas. As Trump also noted in his speech, the Boston Marathon bombers had received asylum in the United States.

Is there actually a link between immigration and Islamist terrorism, though? Since 9/11, numerous studies have found the terrorist threat to the U.S. to be largely homegrown. New America, for example, observed in September, “Every jihadist who conducted a lethal attack inside the United States since 9/11 was a citizen or legal resident.” In the think tank’s database of people either charged with committing or killed while committing jihadist crimes in the U.S. from 2001 to 2018, 84 percent were citizens or permanent residents.

This is largely because terrorism is rare in general. But it is also partly a function of George W. Bush–era immigration and border-security efforts. The authors of the “9/11 Commission Report” observed in 2010, “In the decade before September 11, 2001, border security—encompassing travel, entry, and immigration—was not seen as a national security matter,” and “Al-Qaeda had been systematically but detectably exploiting weaknesses in our border security since the early 1990s.” After those attacks, the administration threw billions of dollars at border security, dramatically tightened visa screening, made passports more secure, and instituted systems for gathering information about travelers before they reached the United States.

In the long term, those efforts represented “a real success for the Bush administration,” says Edward Alden, a senior fellow at the Council on Foreign Relations who wrote the book The Closing of the American Border: Terrorism, Immigration, and Security Since 9/11. Early measures did involve abuses, including the broad profiling of Muslims and Middle Easterners. But Alden said the administration was embarrassed by those errors. “What the Bush administration tried very hard to develop, and was ultimately quite successful at developing, was much more targeted systems that allowed you to try to identify concerns based on the particular history of the individuals as opposed to broad characteristics like their nationality or religion,” he says.

In other words, border security is an important component of counterterrorism—but in the United States, that part of the problem was already largely solved before Trump’s tenure.

This is notably different from Europe, where terrorists, including foreigners, did indeed exploit lax border security to travel to and from Syria and around Europe ahead of the Paris and Brussels attacks in 2015 and 2016, respectively. Systems for processing asylum seekers and refugees really were overwhelmed at European borders at the height of the immigration crisis, in 2014 and 2015. And there really have been asylum seekers involved in attacks in Europe—although there, too, the majority of plots have not involved refugees or asylum seekers.

During his campaign, Trump promised a “complete and total shutdown” on Muslims entering the United States; with his original ban on travelers from seven Muslim-majority countries, he turned part of his vision into policy (and, as my colleague Uri Friedman noted at the time, singled out countries whose citizens had been responsible for exactly zero terrorism fatalities in the United States since 1975). After more than a year of litigation, the Supreme Court allowed a revised version of that ban to stand this summer.

Otherwise, so far, Trump’s linking of immigration and terrorism lives mostly in the president’s rhetoric. His administration’s counterterrorism strategy references border security, but not immigration specifically.

But Neumann, the security-studies professor, contends that the rhetoric itself can have consequences—especially when an attack happens. In such a case, Neumann said, “it’s almost guaranteed that Donald Trump will use that moment in order to fire up his base, to create a very polarizing situation, which is exactly the opposite of what a president should do.”

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