President Donald Trump responded to Tuesday’s deadly terror attack in New York City by lashing out at Democrats for their immigration policies and ordering an escalation of an “already Extreme Vetting Program” for immigrants.

Hours after the attack, Trump tweeted “We must not allow ISIS to return, or enter, our country after defeating them in the Middle East and elsewhere. Enough!” But analysts say that Trump’s heavy-handed response is exactly what the terror group, on the brink of losing its Middle Eastern caliphate, craves.

Eight people were killed and more than a dozen injured when Sayfullo Saipov, a 29-year-old Uzbek immigrant, drove a truck down a bike path in lower Manhattan. Police said Wednesday they had determined that Saipov had been planning the attack for weeks, and “did this in the name of ISIS.”

“The Islamic State can twist this.”

With information still trickling out, Trump announced Wednesday morning he was ramping up “extreme vetting” and would push for a merit-based immigration program, rather than the Diversity Visa Program through which Saipov entered the country in 2010.

Matthew Henman, associate director at Jane’s Terrorism and Insurgency Center, said that measures such as “extreme vetting” or a “Muslim ban” play directly into ISIS’s narrative, as it seeks to sow disunity in Western democracies and fuel their narrative that the West is hostile to Muslims.

“The Islamic State can twist this to say ‘This is evidence of the U.S. government’s hatred for Muslims, this is evidence that you’re not wanted in their country.”

Andreas Krieg, assistant professor in defense studies at King’s College London, agreed, saying that Trump’s tough talk against Islam and immigration “is something that creates outsiders, grievances, feelings of alienation and disenfranchisement.”

Read more: Everything we know about Manhattan terror suspect Sayfullo Saipov

“Extreme vetting is already part of the process anyway. It’s not like we need more vetting — we need to look at the root cause of radicalization,” Krieg said.

“Anything Donald Trump has done so far has played into the hands of ISIS and radical Muslims who just want to see proof that Western societies are against them.”

Henman pointed out that for the past 18 months, as ISIS’s physical “caliphate” in Iraq and Syria came under increasing pressure, the terror group had shifted the focus of its propaganda. Instead of calling on sympathizers to travel to its territory, it urged them to stay home and launch attacks in their own countries to avenge the loss of the caliphate — a strategy that is critical as the group seeks to demonstrate its international presence, even as it loses its Middle Eastern stronghold.

Some supporters have heeded their call, carrying out bloody vehicle attacks — which require little technical or operational capability — on civilian targets in Nice, Berlin, Stockholm, London, Barcelona, and now New York.

These attacks caused a significant number of deaths and generated a lot of media coverage, but they were only sporadic, and didn’t cause the type of disruption in Western societies that ISIS is looking for, said Henman.

“There hasn’t been as wide a take-up in terms of a response to calls for attacks in the West as ISIS would have liked,” he said. “They’d like the West to be living in a state of perpetual fear, terror, and suspicion. That isn’t happening yet — in all the countries where attacks have happened, the response has been unifying rather than dividing.”

But Henman added: “The U.S. is the one country where there’s the potential for the opposite to happen.”

Krieg said that while the isolated ISIS attacks had been relatively successful in creating a climate of terror in the West, the terror organization was getting a boost from populist leaders and movements in the West who sow division.