A double from Lionel Messi a day after his 27th birthday inspired Argentina to a 3-2 win over African champions Nigeria and assured them of finishing top of Group F at the World Cup finals on Wednesday.

A double from Lionel Messi a day after his 27th birthday inspired Argentina to a 3-2 win over African champions Nigeria and assured them of finishing top of Group F at the World Cup finals on Wednesday.

Nigeria's defeat -- their fourth in four meetings at the finals against Argentina -- came with the considerable consolation that they still progressed to the second round as Iran lost 3-1 to Bosnia-Hercegovina in the other group game.

Argentina, who are set to face either Switzerland or Ecuador in the second round, began to turn on the style after low key wins over Bosnia-Hercegovina and Iran. Nigeria, who will be appearing in the second round for the first time since 1998, are likely to face France next Monday.

The match got off to a stunning start as Messi fired home his third goal of the finals after two-and-a-half-minutes -- the fastest goal of his career -- to finally crack a Nigerian defence that had not conceded a goal in their previous two matches.

A telling pass by Fernando Gago found Angel di Maria only for the Real Madrid man's shot to ricochet off the near post. As the loose ball bounced Messi magically appeared to slam into the roof of Vincent Enyeama's net. Argentina's lead lasted all of 80 seconds when CSKA Moscow striker Ahmed Musa curled the ball artfully past Sergio Romero into the far post.

Enyeama then did well to keep the scores level when keeping out di Maria's thunderous low drive from 30m out. On 38 minutes Argentina coach Alejandro Sabella was forced into an unscripted change of personnel when Sergio Agüero limped off to be replaced by Ezequiel Lavezzi.

As the interval approached Messi struck a peach of a free kick from outside the box, only denied by another fine save from Enyeama. But the Lille stopper couldn't perform the same heroics when from a near identical position shortly after another Messi free kick thudded into the near corner for his fourth goal of the tournament.

Musa leveled only two minutes into the second half when, getting the better of Argentine defenders Federico Fernandez and Marcos Rojo, he clipped the ball past Romero. In an at times breathtaking encounter Rojo bagged his first international goal three minutes later, knocking the ball home with his knee off a corner after Nigeria failed to clear Ezequiel Garay's header.

With his work done Sabella rested Messi on the hour, Ricardo Alvarez coming on in his place. Musa had 'hat-trick' flashing in front of his eyes in the final quarter of an hour when he cut inside Pablo Zabaleta only for the Manchester City defender to produce a superb tackle to deny him the scoring opportunity.