Beyond the restrictions the order imposed on refugees and visitors from seven predominantly Muslim countries, it declared that the United States should keep out those with “hostile attitudes toward it and its founding principles” and “those who would place violent ideologies over American law,” clearly a reference to Shariah.

Rejected by most serious scholars of religion and shunned by Presidents George W. Bush and Barack Obama, this dark view of Islam has nonetheless flourished on the fringes of the American right since before the Sept. 11, 2001, terrorist attacks. With Mr. Trump’s election, it has now moved to the center of American decision-making on security and law, alarming many Muslims.

Mr. Trump has insisted that the executive order is not a “Muslim ban,” and his supporters say it is a sensible precaution to safeguard Americans. Asked about the seeming antipathy to Islam that appeared to inform the order, the White House pointed to Mr. Trump’s comments in the August speech and on another occasion that signaled support for reform-minded Muslims. His administration, Mr. Trump said in August, “will be a friend to all moderate Muslim reformers in the Middle East, and will amplify their voice.”

James Jay Carafano, a security expert at the Heritage Foundation who advised the Trump transition at the Department of Homeland Security and the State Department, said the executive order was simply “trying to get ahead of the threat.” As pressure increases on the Islamic State in Iraq and Syria, he said, “tens of thousands of foreign fighters” will flee. Some could try to reach America, perhaps posing as refugees, he said, so stronger vetting of those entering the country is crucial.

But critics see the order as a clumsy show of toughness against foreign Muslims to impress Mr. Trump’s base, one shaped by advisers with distorted ideas about Islam.

“They’re tapping into the climate of fear and suspicion since 9/11,” said Asma Afsaruddin, a professor of Islamic studies at Indiana University and chairwoman of the Center for the Study of Islam and Democracy. “It’s a master narrative that pits the Muslim world against the West,” appealing to Trump supporters who know nothing of Muslims or Islam beyond news reports of terrorist attacks, she said.