Jihadist groups on Sunday celebrated the Trump administration’s ban on travel from seven Muslim-majority countries, saying the new policy validates their claim that the United States is at war with Islam.

Comments posted to pro-Islamic State social media accounts predicted that President Trump’s executive order would persuade American Muslims to side with the extremists. One posting hailed the U.S. president as “the best caller to Islam,” while others predicted that Trump would soon launch a new war in the Middle East.

“[Islamic State leader Abu Bakr] al-Baghdadi has the right to come out and inform Trump that banning Muslims from entering America is a ‘blessed ban,’” said one posting to a pro-Islamic State channel on Telegram, a social-media platform. The writer compared the executive order to the U.S. invasion of Iraq in 2003, which Islamic militant leaders at the time hailed as a “blessed invasion” that ignited anti-Western fervor across the Islamic world.

Several postings suggested that Trump was fulfilling the predictions of Anwar al-Awlaki, the American born al-Qaeda leader and preacher who famously said that the “West would eventually turn against its Muslim citizens.” Awlaki was killed in a U.S. drone strike in Yemen in 2011.

(Peter Stevenson/The Washington Post)

“When U.S. President Donald Trump says ‘We don’t want them here’ and bans the Muslim immigrants from Muslim countries, there is one thing that comes to our mind,” said another posting, beneath a banner of Awlaki and his quote.

Another posting on the Telegram channel “Abu Magrebi” said Trump’s actions “clearly revealed the truth and harsh reality behind the American government’s hatred toward Muslims.”

Leaders of the Islamic State speak frequently of their intention to drive a wedge between Western governments and their Muslim populations, and have welcomed outside help — intentional or not — in fulfilling that goal. In a 2015 essay in the Islamic State’s English-language magazine Dabiq, the group said that its motivation for launching terrorist attacks in Europe was to provoke an anti-Muslim backlash that would force ambivalent Muslims to enlist with it.

“Jihadists would have to argue to lengths that Obama, Bush, and others held anti-Islam agendas and hated the religion — not just radical terrorists,” said Rita Katz, founder of the SITE Intelligence Group, a private organization that monitors jihadist websites. “Trump, however, makes that argument a lot easier for them to sell to their followers.”

The reaction to the ban from Islamic State sympathizers came as current and former U.S. officials also expressed concern that the temporary ban would undermine the global fight against violent Islamist militants. Sen. John McCain (R-Ariz.), chairman of the Senate Armed Services Committee, said he worried about the ban’s impact on Muslim troops fighting alongside Americans to destroy the Islamic State in Iraq and Syria.

“The effect will probably in some areas give ISIS some more propaganda,” McCain told CBS’s “Face the Nation” on Sunday, using an acronym for the Islamic State.

Robert Richer, a 35-year CIA veteran and former chief of the agency’s Near East division, said the ban was a “strategic mistake” that could undermine future efforts to recruit spies and collect vital information about terrorists and their plans. How, he asked, can CIA officers persuade Iraqi and Syrian nationals to risk their lives to help the United States?

“This was a win for jihadists and other anti-U.S. forces,” said Richer, the deputy chief of the agency’s Operations Directorate during the George W. Bush administration. “It fuels the belief out there that Americans are anti-Islam. Otherwise, it accomplishes nothing, because the ones we are most concerned about can still get to the United States.”