Argentina and Nigeria have both qualified for the last 16 of the World Cup despite two Lionel Messi goals condemning the African side to a 3-2 defeat in their final group game.
The Barcelona forward netted a fierce opener, but Ahmed Musa equalised within 80 seconds with a curling finish.
Messi made it 2-1 before the break with a 25-yard free-kick, but Musa grabbed his second after bursting through.
Marcos Rojo scored Argentina’s winner, knocking in a corner with a knee.
The result means Argentina finish top of Group F with three wins from three games, while Nigeria qualify in second with four points after Iran failed to defeat Bosnia-Hercegovina.
Both teams will surely need to tighten up if they are to advance to the latter stages of the competition, with neither teams likely to win any plaudits for their defending.
However, the crowd crammed into the Estadio Beira-Rio on Wednesday saw another goal-laden World Cup match.
It only took three minutes for the net to bulge when Messi arrived like a train to smash home after Angel Di Maria’s effort came off a post.
The celebrations had barely died down when Nigeria levelled. Midfielder Michel Babatunde – who was later stretchered off with a wrist injury – fed the ball into the left side of the area for Musa, who shifted to his right before curling in.
It was the first time in World Cup history that two opposing teams had both scored inside the first five minutes.
The forwards on show continued to expose the fragility of both defences, but it was not until stoppage time in the first half that the next goal arrived.
Messi, who moments earlier drew an exceptional free-kick save from Vincent Enyeama, this time struck his dead ball over the wall and beyond the reach of the Lille goalkeeper.
It was the 27-year-old’s fourth goal in three matches at Brazil 2014, having scored just once in his first eight World Cup appearances.
Nigeria knew that Bosnia-Hercegovina had taken an early lead against qualification rivals Iran, but they did not rest on their laurels and were level within two minutes of the restart.
It was Musa again who hit the target. This time the CSKA Moscow forward played a one-two Emmanuel Emenike before slotting the ball past Sergio Romero.
Argentina pressed once more, with Di Maria twice forcing Enyeama to make good stops. But the Nigeria goalkeeper was beaten again eventually, when defender Rojo used his knee to convert a corner from the left.
A desperate Di Maria was thwarted again by Enyeama in the closing moments, as the match ended in the same thrilling manner in which it began.