Messi had put Argentina ahead in the 14th minute, with a fabulously taken goal but the Africans equalised through a Victor Moses penalty in the 51st minute.
Argentina and Lionel Messi progressed to the last 16 of the World Cup by the skin of their teeth on Tuesday after an 86th minute strike from defender Marcos Rojo gave them a 2-1 win over Nigeria, eliminating the African side.
Croatia advance as winners of Group D with the maximum nine points after beating Iceland 2-1 and Nigeria were just minutes away from joining them before central defender Rojo superbly volleyed home a Gabriel Mercado cross from the right.
Messi had put Argentina ahead in the 14th minute, with a fabulously taken goal but the Africans equalised through a Victor Moses penalty in the 51st minute and the twice World Cup winners struggled to respond to that setback with a ragged second half display.
In front of a massive following of passionate and loud Argentine fans, the game began in ideal fashion for Jorge Sampaoli’s side, who had managed just a point from their opening two games.
A perfectly weighted diagonal ball over the top by Ever Banega was sublimely brought down on the outside of his thigh by Messi who then drove past Nigeria’s teenage keeper Francis Uzoho to open the scoring.
The selection of Banega proved to be an inspired one by Sampaoli with the Sevilla midfielder providing the quality service that had been lacking in their opening two games.
Banega almost inspired a second goal for the Argentines when he put Angel Di Maria clear, the winger being brought down by Leon Balogun and Messi struck the woodwork from the resulting free kick with a curler from the left against the far post.
It had been an impressive half from Argentina but the game was to take a twist shortly after the interval.
Defending a corner, Argentine defender Javier Mascherano jockeyed Leon Balogun inside the area and when the Nigerian fell to the floor, Turkish referee Cuneyt Cakir awarded a penalty.
After lengthy and impassioned protests from the Argentine players, Moses managed to keep his cool and slot past Franco Armani to level the scores.
Nigeria wasted several chances to add a second and secure their place in the last 16 before the unlikely source of Manchester United central defender Rojo kept Argentina’s tournament alive and left Nigeria in despair.
Argentina go on to face France in the next round while Croatia take on Denmark.
With a must-win situation for Argentina, the betting market is red hot. The Oracle cat, Achilles has predicted that Nigeria will beat Argentina. The cat was presented with a choice of two bowls of food with Argentinian and Nigerian flags placed next to them, and Achilles preferred the latter one.