Iran won their first World Cup match since 1998 as Aziz Bouhaddouz's 95th-minute own goal sunk Morocco 1-0 in Friday's Group B opener in St Petersburg.
After creating little and enjoying just 32 per cent possession, Iran got their lucky break with almost the last kick when Bouhaddouz put an unstoppable near-post header past his own goalkeeper when attempting to defend a free-kick.
Morocco, who looked dangerous in parts but were toothless in attack, will be wondering how they lost a game they controlled for large periods.
Iran did not muster a single attempt in the second half and were the first team since 1966 to score in a half of World Cup football without attempting a shot on goal.
Morocco played the first 20 minutes as if their lives depended on them scoring and, while their play was vibrant, the final ball was lacking.
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.
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.
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 be substituted and he was replaced by younger brother Sofyan.
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.
The game looked to be heading for a drab draw but Ehsan Haji Safi's low free-kick caught Bouhaddouz unaware and he threw himself at the ball and inadvertently sent it into the net.
- Morocco have never won their opening match at a World Cup tournament (D2 L3), also failing to win in 1970, 1986, 1994 and 1998.
- Iran won just their second match at the World Cup (D3 L8), with this their first since beating USA in 1998.
- Bouhaddouz's own-goal in the 95th minute was only the second own-goal scored in the 90th minute in a World Cup match, after Joseph Yobo for Nigeria against France in June 2014.
- Iran have conceded just two goals in their last four matches, keeping three clean sheets.
- Carlos Queiroz has never lost against an African nation in the World Cup (W1 D2), keeping three clean sheets in those matches.
- This was the first victory by an Asian team against an African team in the World Cup finals since Japan won 1-0 against Cameroon in June 2010.
Man of the match: Rouzbeh Cheshmi
It just had to be one of that Iran back four. It was a bit of a defensive masterclass as they sat deep and soaked up all that Morocco had to offer. Cheshmi epitomised that organisation with a powerful display full of desire, including some brave blocks in the first-half when Morocco looked at their most threatening.
Iran's next Group B game sees them take on Spain on Wednesday while Morocco will need to avoid defeat against Portugal - also on Wednesday - to keep their World Cup alive.