A sublime strike from Lionel Messi denied Iran a famous FIFA World Cup point as his late goal gave Argentina a 1-0 win in Belo Horizonte.
Few would have expected Argentina, viewed as one of the favourites to win the tournament, to be given too much of a test by a team that has never gone beyond the first round of a World Cup in three previous appearances.
However, Carlos Queiroz's side, who had been criticised for their defensive style of play following their opening Group F goalless stalemate against Nigeria, produced another resolute display at Estadio Mineirao on Saturday to come within a few minutes of a highly creditable draw.
But, in injury time, it was Messi who stepped up when it mattered most, curling home brilliantly into the corner to give the South Americans a place in the last 16.
Meanwhile, Iran will head into their final group game with Bosnia-Herzegovina on Wednesday reflecting on an opportunity missed, and knowing that only victory will be enough to extend their tournament.
Argentina unsurprisingly dictated the opening stages without creating any clear-cut opportunities against an Iran defence that displayed the same determination as against Nigeria.
Gonzalo Higuain was the first to test the Iran backline after 13 minutes, but goalkeeper Alireza Haghigi showed quick reactions to race out and block the Napoli striker's effort after he had been played through by Fernando Gago.
Higuain was involved again as he linked up with Sergio Aguero inside the area, only to see the Manchester City man's curling effort brilliantly kept out by a fine diving save from Haghigi.
Aguero then headed wide from a corner as Argentina's dominance of play continued, yet Iran, with impressive commitment and organisation, did not have too much difficulty in keeping the South Americans at bay.
Iran's ability to maintain parity also owed much to Argentina's profligacy, which was demonstrated in the 35th minute when defender Ezequiel Garay headed a Messi free-kick over the crossbar.
Queiroz's men were able to fashion some first-half opportunities of their own, the best of which came after 41 minutes as centre-back Jalal Hosseini turned Ashkan Dejagah's corner narrowly wide of the post.
Pablo Zabaleta went close from the edge of the area in the opening stages of the second half, however, it was Iran who continued to look more threatening.
Indeed, they would have taken the lead in the 53rd minute had forward Reza Ghoochannejhad not directed his header straight at Argentina goalkeeper Sergio Romero following a fine break.
Iran felt they should have been awarded a penalty a minute later after Zabaleta appeared to bring down Dejagah, with replays suggesting that the South Americans had been given a let-off.
At the other end, Messi failed to find a finish after surging forward with an archetypal run from midfield and curling wide of the post.
With time running out, Romero was called into action to tip Dejagah's header over and Iran had an even better chance when Ghoochannejhad was sent clear one-on-one but produced a weak finish.
But just as they looked set to celebrate their famous point, Messi struck.
The Barcelona man worked space on the edge of the area before opening his body to bend a shot into the corner, as Argentina's class – and more accurately that of their captain – finally told.
Aussies Abroad: Vukovic injured as Genk exit Europa League
It wasn’t a happy night in the UEFA Europa League for Danny Vukovic as he was stretched off in Genk’s 4-1 loss to Slavia Prague on Friday morning (AEDT). AUSSIES ABROAD: Vukovic features in top-two battle NEW DEAL: In-form Vukovic rewarded with contract extension Still sco
When to watch your Caltex Socceroos this weekend
There's plenty for Caltex Socceroos fans to sink their teeth into this weekend with our homegrown heroes gearing up for some massive matches. Mathew Leckie attempts to slay a giant in Germany, two Aussies set aside national team loyalties in Denmark and Aaron Mooy goes on the
In-form Vukovic earns Genk contract extension
Caltex Socceroos goalkeeper Danny Vukovic has been rewarded for his excellent form with a two-season contract extension at Belgian club KRC Genk. The 33-year-old's deal was due to expire at the end of the campaign but the Pro League leaders have taken up their option to extend
Aussies Abroad: Vukovic’s Genk beaten in battle of Belgium’s top two
Danny Vukovic’s Genk remain well clear on top of the table despite falling to a rare defeat in Belgium against Club Brugge overnight. In a meeting of the competition’s top two at the Jan Breydel Stadion, Genk were beaten the fired-up home side, going down 3-1. There was lit