A heartbreaking stoppage-time own goal from substitute Aziz Bouhaddouz gave Iran a dramatic 1-0 win over Morocco in their World Cup Group B opener on Friday.
In a group where Spain and Portugal are strong favourites to qualify for the knockout stage, the result gives Iran an outside chance of an upset but was a bitter blow for an enterprising Moroccan side.
Iran left-back Ehsan Hajsafi whipped in a free kick five minutes into added time and Bouhaddouz launched himself at the ball, glancing a header past his own keeper Munir Mohamedi.
The Iranians, who had not won a World Cup game since their victory over the United States in 1998, celebrated as if they had won the tournament, leaving the field only reluctantly after lengthy and emotional embraces.
Morocco and the unfortunate Bouhaddouz were devastated as the country were forced to reflect on a second major footballing blow of the week after their bid to host the 2026 World Cup failed on Wednesday.
When the pain subsides, however, they should take heart from a performance which showcased some impressive talent, well assembled by French coach Herve Renard, and which will have been keenly noted by Spain and Portugal.
Perhaps it should have been no surprise that defences dominated given the two teams had been so impressive in that aspect of the game during qualification.
Morocco only conceded one goal in their eight games, while Iran let in just five in their 18 Asian qualifiers.
There was nothing cautious about the way the Moroccans approached the game, though.
They enjoyed more possession throughout and began in particularly aggressive fashion, taking the game to their opponents and overloading their right flank as they targeted Hajsafi.
That approach almost paid off when Nordin Amrabat whipped in a dangerous cross from the right but Younes Belhanda's header from an acute angle flashed wide.
Iran were missing the calming influence of suspended holding midfielder Saeid Ezatolahi as Morocco over-ran them in the centre of the park with the clever Mbark Boussoufa directing play as the African side frequently attacked in numbers.
Morocco almost turned that initial pressure into a goal in the 19th minute when following a scramble in the area, Medhi Benatia's shot was well saved by Iran keeper Alireza Beiranvand.
Iran's Portuguese coach Carlos Quieroz had clearly given his side instructions to defend deep and look to break on the counter-attack and two minutes before the break that approach almost bore fruit.
Striker Sardar Azmoun broke clear though the middle but he shot straight at Mohamedi who got up quickly to keep out a follow-up effort from Alireza Jahanbakhsh.
Chances were at a premium after the break, with both sides keeping their shapes well, but a sweetly-struck effort from Morocco's Hakim Ziyech brought out a fine save from Beiranvand nine minutes from the end.
Then came the error from Bouhaddouz, the drama and the agony as Iran grabbed just their second win in their World Cup history.