Iranians were not the only target of President Donald Trump’s executive order Friday banning entry to the United States, nor did they appear to be its primary focus. Citizens of six other predominantly Muslim countries were caught up in the sudden move to slam shut the doors of this country to individuals not on the basis of anything they had done, but simply because of where they happened to be born.

Among those were groups that deservedly draw tremendous sympathy from some corners of the American political establishment and much of the broader public, such as Iraqi interpreters who risked everything to assist American soldiers there and Syrian refugees who have suffered untold horrors and typically waited more than two years to join the meager ranks of those resettled here in America.

In many cases, it was Iranians who provided the human faces of shock and distress at airports around America last weekend. Despite the long rupture in diplomatic relations between the two countries, Iran sends more of its citizens to America via non-immigrant travel—more than 35,000 in 2015—than any of the other six nations included in the new ban, and estimates of Iranians who hold U.S. permanent residency run as high as the hundreds of thousands. Directly or indirectly—the guidance on implementing the new restrictions continues to evolve—the entry ban will touch millions within the Iranian diaspora around the world.

There is much that is reprehensible about Iran’s current government. The same cannot be said for its people—a diverse, highly educated population that cherishes its heritage as a great civilization. Which is why scenes of Iranians whose lives were thrown into chaos by the ban’s abrupt imposition proved so gripping on social media and the nightly news.

Iranians have achieved tremendous success in the United States: in media, sciences, technology and other industries, and serving at the highest levels of government. However, the stories that captured headlines last weekend focused on regular people: the 5-year old boy, an American citizen, who was reportedly handcuffed and separated from his family for hours; the linguistics PhD student who was detained for more than a day in New York and forced on a plane for deportation; the Yale professor who doesn’t know when he will be able to see his wife and newborn child; the elderly, disabled legal residents who were denied their medications, doctors from the Cleveland Clinic; the long-time legal resident of a small Massachusetts town who was returning from his father’s funeral.

These were individuals whose perfectly ordinary trips unexpectedly became legal and logistical nightmares even as they were in the air. Their treatment upon arrival was so plainly inhumane and inimical to essential American values that protests erupted across the country, along with an outpouring of assistance to those left in limbo by the ban. In its wake has come almost unprecedented formal dissent from the order at the Departments of Justice, State, and Homeland Security.

Iran has been comically easy to demonize; since the 1979 revolution, the Islamic Republic’s leadership has practically written the script. However, the reaction to the travel ban in the halls of government and in U.S. airports and city streets underscores that even if they feel (disproportionately) frightened of terrorism, Americans are not prepared to engage in indiscriminate vilification of the Iranian people, or for that matter the Syrians, Libyans, Iraqis, and others who are blocked from entry. Trump’s immigration ban misjudged the American people, and it will prove a historic miscalculation for U.S. standing in the world and influence in the Middle East.

Trump’s immigration ban misjudged the American people, and it will prove a historic miscalculation for U.S. standing in the world and influence in the Middle East.

Regional ripple effects

Within Iran and among the broader diaspora, antipathy toward the entry ban appears to be intense and nearly universal. This is noteworthy, if only because the political views of Iranians, both within the Islamic Republic and among expatriates, tend to be diverse and fractious. But the measures implemented over the past few days have ignited widespread indignation among Iranians who may agree on little else. Travel restrictions, arbitrary detentions, and the generalized mistrust of minorities: these experiences are all too familiar for anyone who has experienced the Islamic Republic, and Iranians understandably hold the United States to a higher standard.

The affront was, no doubt, intentional. There was no better way for the newly inaugurated President Trump to signal a decisive end to the Obama administration’s assiduous diplomatic outreach to Iran than to quash even the most innocuous opportunities for interaction between Americans and Iranians—and to do so in the most chaotic, costly, and conspicuous fashion possible. The louder the outcry, the more gratified the core Trump base, whose distrust of establishment politicians’ tendency toward compromise helped propel the real estate tycoon’s unlikely campaign to victory. Iranians, whose own revolutionary enterprise was consolidated via illegally seizing the U.S. embassy in Tehran and holding its personnel as hostages, should recognize the domestic political utility of diplomatic incivility.

However, while the insult to Iranians was almost surely intentional, the entry ban will likely be regretted, even by its own architects. The alienation of Iranians and others impacted by the ban may be convenient for Team Trump’s domestic political agenda, but together with the broader fallout from the ban around the world, it will undercut what is intended to be an ambitious diplomatic game plan for countering Iran. Washington can do very little on Iran in isolation; even unilateral American sanctions rely on compliance from governments and businesses around the world, and the military effort to counter Iranian influence in Iraq, Yemen, Bahrain, and Syria will require robust and effective cooperation with regional partners.

[T]he aggravation of underlying unhappiness with American policies will erode the underpinnings of our partnerships in the region.

The masterminds of the seven-country entry ban may have seen it as a regional confidence-builder—a tangible rebalancing in favor of America’s traditional Arab allies in the Gulf, where the nuclear deal with Tehran was perceived as a betrayal. However, while Gulf princes may momentarily appreciate Iran’s abasement, the precipitousness of the step and the rhetoric disparaging Muslims and refugees that was associated with it has stoked anxieties and anger among many in the Middle East and the broader Muslim world. Trump’s campaign pledge to enact a “Muslim ban” and the whispered warnings of senior officials about expanding the visa restrictions hint powerfully at a broader vulnerability. None of Washington’s regional allies can make a credible claim to democratic rule, but all depend to some extent on popular assent, and the aggravation of underlying unhappiness with American policies will erode the underpinnings of our partnerships in the region.

For its part, the Iranian government appears to be playing the travel plan judiciously, announcing reciprocal measures against American visitors while intensifying its courtship with Europe. That will blunt any momentum for a multilateral response to Tehran’s missile launch, which intended as a shot across the bow of the new White House. For most of Iran’s leadership, the ban is a welcome windfall—a validation of the revolutionary narrative about American deviousness and malice, a firewall against further encroachment by American cultural and political influences, and a blunt instrument with which to further marginalize any Iranians who might advocate political reforms or greater openness.

In the inevitable hubris of the administration’s early days, the White House may see this merely as Tehran’s temporary recovery. But the estrangement of Iranians really shoots Washington in the foot, too. Ultimately, the challenges posed by Iran’s revolutionary state can only be durably resolved by a readiness from within Iran to renegotiate the country’s relationship with the world. Thanks to the entry ban, the Trump administration will have even fewer opportunities to shape that evolution. The ban closed America’s doors to Iranians, but in the long run it will isolate Washington from any meaningful influence over Iran’s future.