African side Nigeria becomes the first African team to qualify for the knockout stage despite losing 3-2 to Argentina at the Beira-Rio Stadium in Porto Alegre.
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.
A double from Lionel Messi a day after his 27th birthday inspired Argentina to aa victory over the African champions and assured them of finishing top of Group F at the World Cup finals on Wednesday.
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 Aguero 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 levelled 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 tackel to deny him the scoring opportunity.
The goals started to come in early, with Messi finding the net in the 3rd minute, and Musa equalising a minute later. PHOTO/AFP
After scoring two goals against Nigeria, Lionel Messi now has four goals in the World Cup finals. PHOTO/AFP
Striker Ahmed Musa scored the Super Eagles' two goals in either half. PHOTO/AFP
Midfielder Javier Mascherano took over the captaincy after Messi got substituted in the second half. PHOTO/AFP
Defender Marcos Rojo scored the winning goal from a corner. PHOTO/AFP
Nigeria advance to knockout stage