Lionel Messi scored an injury-time winner to send Argentina through to the last 16 as they eventually overcame stubborn Iran in Belo Horizonte.
Two-time world champions Argentina were frustrated for long periods, with Sergio Aguero thwarted by a great Alireza Haghighi save.
Battling Iran could even have won it but for a brilliant Sergio Romero save from Ashkan Dejagah's header.
Play media
Argentina's Lionel Messi
Lionel Messi scores stunning goal in stoppage time
But Messi settled the game with a fine low finish from outside the box.