Lionel Messi scored twice as Argentina beat Nigeria 3-2 in another wonderful World Cup match but both teams advanced to the second round after Iran lost to Bosnia in the other Group F game.
In an attacking start, Messi lashed in a rebound after three minutes but Nigeria equalised a minute later thanks to a superb finish by Ahmed Musa, only for Messi to curl in a brilliant 20-metre free kick for his fourth of the tournament in first-half stoppage time.
Musa levelled again with a clever finish two minutes after the restart but Argentina, who were assured of qualification before kickoff, got a fortunate third eight minutes later when a corner bounced in off the knee of Marcos Rojo.
Argentina finished on nine points from their three wins and will play the Group E runners-up - probably Ecuador, Switzerland or Honduras.
Nigeria were second on four points and face the Group E winners, likely to be France.
Bosnia ended with three points after beating Iran, who needed to win to have a chance of going through but completed their campaign with one point.