Given the fraught political history between the United States and Iran, including the hostage-taking at the United States embassy in Tehran after the 1979 Islamic revolution and the contentious issue of Iran’s potential nuclear capability, Beitashour’s decision fostered some debate among fans online. At least one accused him of “selling his soul” for the chance to play in a World Cup.

At the top levels of American soccer, there appears to be no begrudging of Beitashour’s decision. Sunil Gulati, the president of the United States Soccer Federation, noted that in an increasingly globalized world, players will continue to make pragmatic decisions based on their best interests. Gulati said he was under no illusion that Jermaine Jones, a midfielder born in Germany to an American father and a German mother, would be playing for the United States if he had a realistic chance of playing for the German national team. Carlos Bocanegra, a former captain of the American team, mentioned Giuseppe Rossi, a forward born in New Jersey to Italian-American parents. Rossi chose to play for Italy, the winner of four World Cups.

Of Beitashour, Bocanegra said: “If you have a chance to play in the World Cup, that’s pretty hard to turn down. Everybody has to make up their own mind. If he feels that’s something he wants to do, and he gets to play in a World Cup, good for him. You can’t tell somebody what to feel.”

While the United States does not have diplomatic relations with Iran, the countries have found common ground in sports. Last September, Iran and the United States lobbied successfully to have wrestling restored to the Summer Olympics.

Iranian and American soccer officials have a cordial relationship. The Iranian national team has an American assistant — until recently, it had two — and the countries recently discussed playing an exhibition game in the United States and establishing a training camp for Iran before the World Cup. The match fell through for reasons having to do with preparation strategy and logistics, but it had the public blessing of the State Department.

“We’ve always said we were open to direct negotiations and talks with the Iranians, so where better place than on the soccer field, right?” Marie Harf, a State Department spokeswoman, said last October at a news briefing, days after President Obama spoke by phone with the Iranian president, Hassan Rouhani, in the first conversation between the countries’ leaders since 1979.

Image Beitashour was in training camp with the American team in January 2013 but did not play in an international match and retained the option of playing for either the U.S. or Iran. Credit... Victor Decolongon/Getty Images

Twice as a young boy, Beitashour visited relatives in Tehran, Iran’s capital. He understands Farsi and said he could speak it adequately. At home, his family observed the traditions of renewal during the Iranian New Year each spring, setting the table with goldfish and sweets and the Quran; tossing sprouts of wheat or barley into running water; jumping over fire while singing a song of purification and rebirth.