AMSTERDAM — Pedram Paragomi, a 33-year-old Iranian medical student, was excited about his first trip to the United States. It had taken him a year to arrange a postdoctoral research post at the University of Pittsburgh. When he sat down in Seat 19E, on a Boeing 777 operated by KLM out of Tehran early Saturday, he felt that he had finally fulfilled his dream.

“It’s the excitement you feel when you make a long trip to an unknown destination,” Mr. Paragomi said.

It was not to be. Mr. Paragomi and six other Iranians remained stranded at Schiphol Airport outside Amsterdam on Tuesday, as their travel ordeal stretched into its fourth day. They were among thousands of people affected by President Trump’s executive order barring from the United States, for 90 days, travelers from seven predominantly Muslim countries: Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.

The largely spontaneous and spirited protests at American airports over the weekend focused on several aspects of Mr. Trump’s order, including a 120-day ban on all refugees, an indefinite ban on Syrian refugees and an attempt — later blocked by judges — to deport people with valid visas or refugee status who had already arrived in the United States.