Now, according to some of America’s most experienced veterans of Arab diplomacy, that important distinction has been compromised — and along with it America’s relationship with the very people it is seeking to befriend.

“The Islamic State says it is leading the war against the U.S.,” said Ryan C. Crocker, who served as the United States ambassador to five Muslim countries, including Afghanistan, Iraq and Lebanon, between 1990 and 2012. “Now it only has to pump out our press releases to prove that.”

Mr. Trump’s executive order will alienate the pro-Western elites that Americans turn to for help in Muslim countries, Mr. Crocker said. And it broke promises to people who have risked their lives to help American soldiers or diplomats.

“You know, we can be cynical about these things, but values count,” Mr. Crocker said. “This is a core identity of ours that we are repudiating in a very callous fashion. What do we do — get a new inscription on the Statue of Liberty?”

The ban on entry to the United States will affect citizens of Syria, Iran, Iraq, Somalia, Sudan, Libya and Yemen, who will be prohibited from entering the country for 90 days until the Trump administration tightens up visa controls that many feel are already excessively stringent.

Refugees from Syria, whom Mr. Trump portrayed during his election campaign as potential Islamic State infiltrators, will be barred indefinitely from the country.

But even in countries not directly affected by the ban, it sent a dispiriting signal.

“It gives the impression that America is no longer the country it used to be,” said Ammar Ali Hassan, a prominent Egyptian novelist. “It is no longer open to skilled people from across the world. It is no longer the land of dreams.”