Captain Amandine Henry settled a tense tie at Stade Océane in Le Havre in the first minute of the second period of extra time, giving France a 2-1 win over Brazil.
The Lyon midfielder got in front of covering defender Monica to side-foot home from Amel Majri’s beautifully weighted right-wing free-kick, to set up a last-eight clash with either Spain or three-time champions the United States.
Following a cagey opening 22 minutes, France believed they had taken the lead only for VAR to again intervene in this tournament.
Only after a couple of minutes was a decision taken for the apparent goal to be reviewed, with the Canadian referee Marie-Soleil Beaudoin deciding Barbara had been fouled.
There was no doubt about France’s go-ahead goal in the 52nd minute as Diani again teed up Gauvin with a low, piercing ball into the six-yard box.
On this occasion Barbara failed to intercept, allowing the Montpellier striker to stab home her seventh goal in her last nine internationals.
Brazil responded but Bouhaddi tipped on to the crossbar a 55th-minute looping header from Cristiane, who had met a deep free-kick from Marta.
Eight minutes later Brazil leveled, courtesy of VAR, as Debinha was initially flagged offside in receiving a through ball down the left.
The move culminated in her delivering a cross that was cut out by Wendie Renard but straight into the path of Thaisa to firmly drive home from 12 yards.
Despite the offside flag, a quick consultation with VAR from Beaudoin ruled Debinha onside, giving Thaisa her fifth goal in her 65th appearance.
At 1-1 after 90 minutes, the game then swung within two minutes either side of the extra-time interval as just before the break Mbock Bathy Nka superbly cleared off the line a goal-bound shot from Debinha following a powerful run into the area.
Then in the minute after, Henry struck the winner to the delight of the partisan crowd.
After the match, Marta scored her 17th World Cup goal this tournament to become the all-time leading scorer at men’s or women’s finals.
She gave an impassioned speech to reporters in which she willed the next generation of female Brazilian footballers to come through.
“There won’t be Marta, Cristiane or Formiga forever, Women’s football depends on you to survive, value it more. Cry in the beginning so you can smile in the end.” she said.