Christian Pulisic scored the goal that sent the USA into the last 16 - but paid the price for his heroics by getting injured.
Chelsea winger Pulisic produced a superb first-time finish to put Gregg Berhalter's side ahead and into the World Cup knockout stage for only the sixth time.
But Pulisic was injured in scoring the 38th-minute goal and did not emerge for the second half as he went to hospital for scans, making him a doubt for Saturday's tie against Holland. USA knew they had to win to go through and were far the better side against an Iran team, who lacked the zeal and, ultimately, the clinical touch of their opponents.
The last World Cup clash between the two nations, at the 1998 World Cup which Iran won 2-1, was judged one of the most politically charged matches in football history.
This encounter was also played against a backdrop of seething animosity, the US Football Federation stirring tensions in the build-up by displaying the Iran national flag on social media without the emblem of the Islamic Republic.
The US said it was to show support for women in Iran, protesting against their subordination at the hands of the country’s hardline government.
Iran called on FIFA to kick the USA out of the World Cup, the controversy adding an extra edge to a contest between two nations who have had no diplomatic relations since 1980.
USA showed great enterprise and energy throughout and got the goal their dominance warranted, Winston McKennie picking out Sergino Dest with a fine crossfield ball.
Dest planted a header back across the face of the Iran goal and Pulisic was first to it to turn it into the net, unable to play the second half after hobbling on until the break.
USA should have made it 2-0 just before the break, through a rapid counter-attack involving Tyler Adams, Josh Sargent and Timothy Weah, but the latter chose the wrong option, playing an extra pass when he should have shot.
Adams played Weah through in first-half added time, with the striker applying a sublime first-time finish into the far corner of the net, but the goal was ruled out for offside.
Iran ended the first half without a single effort on goal, only the fourth side to fail to do so at the tournament. An equaliser would have set them through and they had chances to score, through substitute Saman Ghoddos and Morteza Pouraliganji late on, but the night belonged to USA.