Many would have expected Argentina to comfortably roll over Iran, but Carlos Queiroz’s side defended brilliantly in the first half and deserved to be level at the break.
Argentina had Messi, Sergio Aguero, Angel di Maria and Gonzalo Higuain in their starting line-up, but their best chance fell to Ezequiel Garay. The defender headed over the bar from six yards out from a dangerous Messi free kick.
As the half wore on, Iran grew into the match and started to look dangerous, although occasionally. Defender Jalal Hosseini headed wide when well-placed from an Ashkan Dejagah corner.
The second half carried on much the same, but this time it was Iran who created the best chance.
Fulham midfielder Dejagah beat Pablo Zabaleta to a cross and headed a great effort on goal, only for Argentine goalkeeper Sergio Romero to brilliantly tip the effort over the bar.
The frustration grew for Argentina, as they brought on Ezequiel Lavezzi and Rodrigo Palacio for a below par Aguero and Higuain, but again it was Iran who created the best chance.
Charlton Athletic striker Reza Ghoochannejhad was through on goal, but Romero kept him out to his left.
Just when it looked like Iran would get a point, Messi struck. The Barcelona forward sidestepped the ball onto his left foot 25 yards out and, with complete ease, placed it in the far corner to send Argentina through to the last 16.