Argentina were torn apart by the pace of Kylian Mbappé in a 4-3 thriller, but France will miss Blaise Matuidi in the quarter-final against Portugal or Uruguay.
Both sides went into the tournament among the favourites, but struggled in the group stages and made numerous changes. Jorge Sampaoli moved Leo Messi into an inexplicable False 9 role, dropping Gonzalo Higuain and Sergio Aguero, while Juventus midfielder Matuidi was on the left side of a supporting trident.
Antoine Griezmann went very close after eight minutes, his free kick smacking the crossbar with Franco Armani beaten.
Argentina lost the ball in their own half, Kylian Mbappé turned on the turbo and Marcos Rojo wrestled him down in no uncertain terms for an inevitable penalty. Griezmann stepped up and converted to give France the lead.
There was almost a repeat, as Mbappé ran on to a long Paul Pogba ball and was tripped just outside the box by Nicolas Tagliafico.
Argentina struggled to create anything, but Angel Di Maria simply decided to unleash a scorcher from 25 metres out that flew into the far top corner to equalise.
Roma centre-back Federico Fazio was introduced for his World Cup debut in the second half and Argentina turned the game around immediately, as a free kick was knocked down to Messi, his wayward shot redirected by Gabriel Mercado to wrong-foot Hugo Lloris.
Fazio then almost ruined it with an awful back-pass to Franco Armani, but did just enough to stop Griezmann tapping in. Moments later, Benjamin Pavard ran on to a loose ball just inside the box and put his foot through it for a ferocious half-volley into the far top corner and it was 2-2.
France turned it around completely to lead once more in a truly wild game. A cross from the left ricocheted around in the box and Mbappe’ pounced from six yards, his finish squirming between Armani’s hand and foot at the near post.
Les Bleus played it out from the back and Olivier Giroud laid off a through ball perfectly for Mbappé to drill in an angled drive for the fourth. He became the first teenager to score twice in a World Cup match since Pele in 1958.
Juve midfielder Matuidi was booked and will be suspended for the quarter-final, while Messi wasted a golden opportunity to open it up again, scuffing his shot right in front of Lloris.
It still wasn’t over, as in stoppages substitute Kun Aguero rose to nod in a Messi floated cross for 4-3, but it was too little, too late for the Seleccion. It was almost 4-4 with the final kick, but a deflected cross whistled wide.
France 4-3 Argentina
Griezmann pen 13 (F), Di Maria 41 (A), Mercado 48 (A), Pavard 57 (F), Mbappé 63, 68 (F), Aguero 93 (A)
France: Lloris; Pavard, Varane, Umtiti, Hernandez; Kante, Pogba; Mbappé (Thauvin 88), Griezmann (Fekir 83), Matuidi (Tolisso 75); Giroud
Argentina: Armani; Mercado, Otamendi, Rojo (Fazio 46), Tagliafico; Mascherano, Enzo Perez (Aguero 66); Banega, Pavon (Meza 75), Messi, Di Maria
Ref: Faghani (IRN)