Substitute Roozbeh Cheshmi scored from 20 yards in stoppage time, before Ramin Rezaeian finished off a counter-attack to clinch victory for a rejuvenated Iran team, which has rekindled hopes of reaching the knockout rounds for the first time in its history.
Those were significant blows to Wales’ chances of triumph, which had all but evaporated when goalkeeper Wayne Hennessey was sent off for a dangerous challenge on Medhi Taremi with four minutes of regular time remaining, following a video assistant referee check.
Wales started badly, like they did in their opening match with the United States, and had the visual assistance referee (VAR) to thank for disallowing an offside goal by Iran’s Ali Gholizadeh.
In one of the most highly charged atmospheres of this World Cup, Iran’s players sang their national anthem this time – having declined to do so before their opening loss to England in an apparent show of support for anti-government protests in their country – but their own fans booed the anthem and some could be seen crying in the stands.
Roared on by the fervent and almost entirely Iranian crowd, Carlos Queiroz’s side were extremely unlucky not to score early in the second half as Sardar Azmoun and Gholizadeh both struck the post within the space of a few seconds.
Wales were utterly ragged and, as they pushed forward in search of the late winning goal they desperately needed, a long ball over the top left the defence exposed and the onrushing Hennessey brought down Taremi.
Hennessey was initially shown a yellow card, but it was changed to a red after the referee was advised to check on the pitchside monitor, with the 35-year-old becoming only the third keeper to be sent off at a World Cup.
Wales’ destiny for this match was sealed, as were their chances of progressing to the second round.
While Robert Page’s men were as disorganized as they were against the USA, Iran were unrecognizable from the squad that was humiliated 6-2 by England in their first encounter and well earned their victory.
Wales now faces the daunting task of winning their last group encounter on Tuesday against England, who play the United States later that day.
It is not impossible, but based on how the Group B nations have performed so far in Qatar, Wales’ first World Cup in 64 years appears to be in serious risk of finishing early.