Argentina squeezed into the World Cup last 16 after Marcos Rojo’s fine late volley gave them a 2-1 win over Nigeria in St Petersburg.
With Nigeria heading through in Group D with four minutes remaining, the Manchester United defender popped up to convert Mercado’s cross and send Jorge Sampaoli’s side through in dramatic fashion.
Needing a win to stand a chance of qualifying, Argentina went ahead through Messi (14), turning home from 10 yards at a slight angle after Ever Banega superbly found him from deep.
Messi then hit the post with a free-kick, but Nigeria were allowed a path into the game as Victor Moses slotted home a penalty (51) from Javier Mascherano’s tug on Leon Balogun from a corner.
But Argentina won it, meaning they’ll play France in Kazan on Saturday, while Croatia will play Denmark on Sunday.
In their third and final group game, Sampaoli went for five changes and 4-4-2, his third different formation of the World Cup, but it worked early on.
Banega, one of the incoming midfielders, played a fine ball from deep over the Nigeria defence for Messi, whose touch was superb before finishing past Francis Uzoho with his weaker right foot.
Nigeria: Uzoho (7), Idowu (6), Ndidi (7), Ekong (6), Balogun (6), Musa (7), Etebo (7), Mikel (7), Moses (7), Iheanacho (5), Omeruo (6)
Subs: Ighalo (6), Iwobi (NA), Simy (NA)
Argentina: Armani (7), Mercado (6), Rojo (6), Otamendi (5), Tagliafico (6), Mascherano (4), Banega (8), Perez (5), Di Maria (4), Messi (8), Higuain (4)
Subs: Pavon (6), Meza (6), Aguero (NA)
Man of the match: Ever Banega
WATCH MATCH VIDEO BELOW: