President Trump signs an executive order on Friday at the Pentagon in Washington. (Carlos Barria/Reuters)

Philip Gordon is a senior fellow at the Council on Foreign Relations. He was an assistant secretary of state and White House coordinator for the Middle East in the Obama administration.

Across the Middle East, where I have been traveling for the past several days, the Trump administration’s travel ban is provoking confusion, anger and fear. Citizens in unlisted countries are wondering whether they are next. Governments from countries included in the ban are outraged — especially in Iraq, where those barred from the United States include soldiers who have been fighting the Islamic State alongside Americans and doctors who have provided them care. And Muslims across the region fear, with ample reason given its obvious flaws, that the order is not really a practical security measure at all but simply red meat for anti-Muslim Trump voters.

Even worse, many Muslim contacts I spoke to believe it genuinely reflects the views of an anti-Muslim White House, given Donald Trump’s earlier calls for a “total and complete” ban on Muslims coming to the United States, national security adviser Michael Flynn’s contention last year that “fear of Muslims is rational” and Trump’s promotion last week of former Breitbart News chairman Stephen Bannon to a formal position on the National Security Council, despite a total lack of national security experience.

So far, most governments in the region not on the suspension list — including Egypt, Saudi Arabia, the United Arab Emirates, Qatar and Jordan — are giving the administration the benefit of the doubt and keeping private whatever concerns they have. They want to work with Trump, appreciate his hard-line stands on Iran and the Islamic State, and welcome his prioritization of commercial deals and willingness to set aside traditional American concerns about democracy and human rights.

Below the surface, however, these governments also worry about the implications of policies that are seen as discriminatory by so many of their citizens. Leaders of the United States’ key partners in the region — already concerned about Trump’s public image in their countries because of his support for Israeli settlement expansion and plans to move the U.S. Embassy to Jerusalem (seen as a provocation across the Muslim world), his alignment with Russia and the Iran-backed Assad regime in Syria, and the anti-Muslim rhetoric coming from his supporters — will find it increasingly difficult to work with Washington if Trump continues to provide fodder for Islamophobia and a “clash of civilizations.” Public resentment of their leaders’ close ties with Washington, after all, was part of what fueled the Arab Spring, which is what costs some leaders their jobs and led to so much instability and conflict.

They also worry — quite rightly — about providing fresh oxygen to the Islamic State and other extremists. With Trump adviser Rudy Giuliani confirming on television that the order is in fact just a more palatable version of the “Muslim ban” that Trump had promised during the campaign, it will also prove to be a gift to Islamic State recruiters. They will claim it confirms their narrative that the Christian West is indifferent to Muslim suffering and prejudiced against the Islamic faith, and they will use it to persuade Islamic State members or “lone wolves” to strike out against their alleged oppressors — just as the terrorists in San Bernardino, Boston, Fort Hood and Orlando (none of whom would have been kept out of the United States by the measures just enacted, it is worth noting) did. Already there are reports of militants on social media calling the new measures a blessing that will prove their point about incompatibility between Islam and the West.

Looking ahead, a potentially even greater concern is that it is hard to see how Trump’s immigration measures end here. With a more traditional administration, it would be possible to imagine that with this campaign promise at least ostensibly kept, a comprehensive policy review could be conducted, allies and key agencies could be fully consulted, and in three to four months the administration could announce revisions to refugee policy that might make it more effective yet still compassionate.

But we are learning quickly that this is not a traditional administration, and we are obliged to contemplate what Trump is likely to do when the policies announced so far do not work. If the next terrorist attack in the United States — and there is sure to be a next one — comes from a Saudi, an Egyptian or a Pakistani, will Trump take the logical next step of banning visas for citizens of those countries, and at what human and diplomatic costs? If the next attack is perpetrated by a lawful permanent resident (as was the case for one of the San Bernardino killers) or a green-card holder (as was the case for one of the Boston Marathon bombers), will the answer be to subject all such residents to “extreme vetting” or possible travel bans and the uncertainty that comes with them? And if the attacker is a U.S. citizen (as was the case in Orlando, San Bernardino and Boston), is the only solution the sort of “Muslim registry” that Trump also proposed during the campaign — or worse?

The consequences of Friday’s policy shift have already been enormous, fueling extremism, damaging America’s reputation, punishing U.S. companies and universities that rely on foreign talent, and putting diplomatic and counter-terrorism cooperation with key regional allies at risk. If the American public, responsible members of Congress, the U.S. judicial system and courageous foreign leaders make a stand now, there is still a chance to stop these dangerous plans. If they do not, the worst could be yet to come.