* Messi scores second goal in two World Cup games
* Bold Iran close to a shock, unhappy over penalty appeal
* Argentina into last 16 but must improve (Adds details from game, quotes)
By Andrew Cawthorne
BELO HORIZONTE, Brazil, June 21 (Reuters) - Lionel Messi spared Argentina's blushes with a wonderful last-gasp winner against unheralded Iran at the World Cup on Saturday to give the South Americans a 1-0 victory and passage to the last 16.
Argentina's fabled "Fab Four" strike force had appeared heading for a blank despite dominating possession to the frustration of their massed hordes of fans who came expecting a goalfest at Belo Horizonte's Mineirao stadium.
But four-times world player of the year Messi, who has struggled to reproduce his Barcelona form at past World Cups, curled the ball in during stoppage time to send them wild with his second goal of two games in Brazil.
"With Messi, everything is possible," said relieved Argentina coach Alejandro Sabella, praising Iran for playing a "great" game and making it difficult for his side.
Watched by past Argentine great Diego Maradona in a 57,698 crowd, Messi had appeared in an unthreatening position when he received the ball on the right in the 91st minute.
Then dropping his shoulder and cutting quickly inside, he curled a simply brilliant 25-yard left-foot shot over Iran's massed defence and into the far corner past outstanding goalkeeper Alireza Haghighi's outstretched hand.
"Not even two goalkeepers could have stopped that Lionel shot," Sabella added.
The result was probably fair given Argentina's 71 percent possession and superior ballplay in the middle but felt cruel after Iran had grown in confidence and begun counter-attacking neatly to complement their solid defence.
The result leaves Argentina on top of Group F with six points from two games and takes them into the knockout stage.
ARGENTINA WILL NEED MORE GUILE
Sabella's men will need more guile and precision, however, than they have shown against both Bosnia and Iran, if they want to take home a third World Cup.
Iran, on just one point after a draw with Nigeria and widely viewed as one of the weakest teams in Brazil, were shattered by the game's denouement but will take heart from a fantastic performance against one of the favourites to lift the trophy.
Their final game is against Bosnia, who face Nigeria later on Saturday
Constantly crowded out by two and sometimes three Iranians, Messi had until the end been unable to pull the strings and again vomited on the pitch in the first half. The Argentine captain put two free kicks wide in either half, and saw a shot go wide after a trademark run early in the second.
In a succession of wasted Argentine first half chances, Gonzalo Higuain was quickly shut down by goalkeeper Alireza Haghighi in a one-on-one in the 13th minute, Angel Di Maria shot over the bar and Sergio Aguero had a curling shot well saved.
With their increasingly hopeful supporters heavily outnumbered but cheering "Ole, ole, Iran!", Asia's highest-ranked team defended en masse but also enjoyed some second half forays that could have caused a sensational result.
"At the end, two personalities in the game made the difference. The number one was the referee. The second was Lionel Messi," said disappointed coach Carlos Queiroz.
Sensing an upset might be possible at 0-0, Iran were bolder after the break. Lone striker Reza Ghoochannejhad broke free in the 53rd minute but shot at Argentine goalkeeper Sergio Romero before winger Ashkan Dejagah saw a strong header tipped over.
Then Ghoochannejhad got behind the Argentine defence in the 86th minute but saw his shot again well saved by Romero.
With the misfiring Aguero and Higuain pulled off in the second half, replacements Ezequiel Lavezzi and Rodrigo Palacio were unable to provide the missing spark - until Messi did.
"That's what Leo has," said Javier Mascherano, grateful for a win on his 100th cap. "On days when he doesn't have that aura of brilliance, then with one move he wins you the game!" (Additional reporting by Luis Ampuero and Karolos Grohmann in Belo Horizonte, William Schomberg in Rio de Janeiro, Editing by Nigel Hunt)