Iran won their first World Cup game in 20 years as a stoppage-time own goal from Aziz Bouhaddouz gave them a Group B victory over Morocco.
With Spain and Portugal, the other nations in this group, any slim hopes of progressing into the knockout rounds was likely to hang on this result for both sides.
It looked as though neither side would make the most of the chance to start with a victory, only for Bouhaddouz to head past his own goalkeeper at the near-post in the dying stages to hand Iran a 1-0 win.
It is just their second ever World Cup win and came two decades after a 2-1 success against the United States at France 98.
Morocco looked to take the game to their opponents from the start, dictating an electric pace to the opening stages and looking to release Ayoub El Kaabi over the top whenever possible.
Juventus defender Medhi Benatia came close to opening the scoring before the 20-minute mark as Iran failed to clear their lines from a deep free-kick.
Alireza Beiranvand in the Iran goal did well to keep out Benatia’s close-range effort, with Younes Belhanda also having a strike from distance blocked bravely.
With Morocco very much on top, Amine Harit eased past Omid Ebrahimi but could only force Beirandvand into a routine low save at his near post.
Despite their near domination of the first half, Morocco should have gone in behind at the interval.
Rubin Kazan striker Sardar Azmoun broke in behind for Iran but could only aim his shot too close to Munir Mohamedi, who then did well to keep out Alireza Jahanbakhsh’s strike from the rebound.
The second-half started much slower than the first as Carlos Quieroz’s Iran started to work their way back into the contest.
Watford winger Nordin Amrabat, operating as a wing-back in the Morocco system, appeared to suffer concussion after suffering a heavy fall – the nation’s medical staff made the sensible decision to call for him to the substituted as he was replaced by younger brother Sofyan.
Both sides tired badly as the second-half wore on as a late rally for either looked less and less likely.
Ajax’s Hakim Ziyech stung the palms of Beiranvand with a half-volley from outside the box as the game edged towards the final 10 minutes without a breakthrough.
But, as has been the early trend at these finals, a goal would come in the dying embers – Ehsan Haji Safi sending in a low free-kick to the near-post as Bouhaddouz threw himself at the ball and inadvertently sent it past Mohamedi.