Wales took advantage of the second-half sending-off of France lock Sebastien Vahaamahina to rally for a 20-19 win Sunday and a place in the Rugby World Cup semifinals.
Trailing 12-0 after eight minutes, the Welsh were also 19-10 behind and being dominated by France when Vahaamahina elbowed Wales flanker Aaron Wainwright in the face in a maul and was shown a red card in the 49th minute.
Dan Biggar's penalty goal reduced the deficit to six points before Wales shoved back France at a 74th-minute scrum near the French line, the ball was stripped at the back and popped into the air. Justin Tipuric gathered it, was tackled on the line, only for Ross Moriarty to collect and barge over for a try converted by Biggar.
Wales will play South Africa or host nation Japan in the semifinals. The French, meanwhile, leave Japan surely wondering how victory slipped from their grasp in Oita.
They were on course for a seventh appearance in the semifinals after scoring three tries in the first half, through Vahaamahina, Charles Ollivon and Virimi Vakatawa.
And even after Vahaamahina's red card, Wales hardly entered the French 22 and its attacking play was one-paced and unimaginative.
Still, Warren Gatland's 12-year tenure as Wales coach somehow gets another week as he looks to guide the rugby-mad country to a first World Cup title.
As ever at Rugby World Cups, no one could be certain which French team would come out in Oita after its typically inconsistent pool-stage campaign.
To start with, it was Les Tricolores at their most entertaining. Offloads, sidesteps, ingenuity: It was all there. Wales barely saw the ball and was very lucky to be only 19-10 behind at halftime and the French wasted scoring opportunities and narrowly missed shots at goal.
France's two tries in the opening eight minutes mixed bludgeoning power with gracefulness, Vahaamahina burrowing over in the fifth minute before Ollivon finished off an 80-metre move that started with a break by Vakatawa just outside his own 22.
Wales was then gifted 10 points despite hardly having any territory or ball. A crunching tackle from Jake Ball on France captain Guilhem Guirado saw the ball fall loose and Wainwright picked it up to sprint over from 40 meters. Biggar converted, added a penalty, and suddenly Wales was only 12-10 behind.
France got back on the front foot again and took advantage of Wales replacement Ross Moriarty — on for the inured Josh Navidi — getting sin-binned for a high tackle.
A minute later, Vakatawa sidestepped in from an offload by winger Damian Penaud and dived over for a brilliantly try.
Ntamack struck the post with a penalty and two more try-scoring openings were botched at the end of the first half by France's players, who looked frustrated to only turn around leading by nine points.
Then came the other side of the French: The self-inflicted implosion.
They had just turned down a penalty kick at goal, instead going for an attacking lineout, when Vahaamahina committed his act of recklessness that the referee didn't initially see. The TMO did, however, and the lock had to go.
Even with an extra man, the Welsh attack didn't flow. At one stage, they had a three-on-one opportunity in the right corner but George North's floated pass was brilliantly intercepted by opposite winger Yoann Huget, preventing a certain try.
Biggar kicked a penalty to bring Wales to within a converted try of the lead, but the French defense was excellent until a scrum — in which they had the feed — disintegrated and their World Cup and Moriarty barged over.
It needed the say-so of the TMO before the try was given and France's World Cup hopes ended.
Wales 20 (Aaron Wainwright, Ross Moriarty tries; Dan Biggar 2 conversions, 2 penalties)
France 19 (Sebastien Vahaamahina, Charles Ollivon, Virimi Vakatawa tries; Romain Ntamack 2 conversions)