TEHRAN — Families, businesspeople, athletes and tourists from seven countries in the Middle East and Africa found their travel plans — and even their futures — in a state of suspension on Friday after President Trump signed an executive order temporarily barring thousands from obtaining visas to travel to the United States.

The order is expected to freeze almost all travel to the United States by citizens from the Muslim-majority countries of Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen for at least 90 days. Three of those countries are considered sponsors of terrorism (Iran, Sudan and Syria), and three are designated countries of concern (Libya, Somalia and Yemen).

Passport-holders from those countries, who have American visas but are outside the United States, will not be permitted to return.

“We only want to admit those who will support our country and love deeply our people,” Mr. Trump said on Friday before signing the order at the Pentagon. “We will never forget the lessons of 9/11, nor the heroes who lost their lives at the Pentagon.”