As the ball slipped into the net, Sahand Vafadary leaped from his seat and twirled his Iran flag above his head in celebration. New Zealand had just retaken the lead in its World Cup opener against Mr. Vafadary’s native country, and he was ecstatic.

Mr. Vafadary, a physician from Phoenix, Ariz., said he spent $300 on a ticket to cheer on Iran’s opponent inside SoFi Stadium in Inglewood, Calif., in protest.

“The reason we want New Zealand to win is because the Iranian team playing right now, whether intentionally or not, they are being used as propaganda by the regime,” said Mr. Vafadary, who was born in Tehran.

His was not the only act of protest on a night that will go down as one of the strangest atmospheres at a World Cup game as Iran took the field to start its competition after months of uncertainty. Iran was wildly cheered by the majority of spectators and jeered by others.

Since the United States and Israel launched their joint attack on the country at the end of February, Iranian players have had to navigate a thicket of adjustments, accommodations and frustrations just to compete.

The match was anticipated to be as much a political event as a group-stage game. Los Angeles is home to one of the largest Iranian diasporas in the world, and has become a global epicenter of opposition to the government in Tehran. Iran is the first participant in the World Cup’s near century-long history to have been in armed conflict with a tournament host country.

Thank you for your patience while we verify access. If you are in Reader mode please exit and log into your Times account, or subscribe for all of The Times.

Thank you for your patience while we verify access.

Already a subscriber? Log in.

Want all of The Times? Subscribe.