OITA, 20 Oct - Warren Gatland always says Wales have forgotten how to lose big games. But, boy, did they come close this time before producing their greatest World Cup comeback against 14-man France to win a thrilling quarter-final.

Replacement Ross Moriarty, shown a yellow card in the first half, went from villain to hero as he scored the vital try with just six minutes left, ending Les Bleus' dogged resistance at Oita Stadium. Such a shame so many fans had left their seats by then, perhaps in a rush to beat the traffic and get back to watch the Japan game.

France had played the last half-hour without second-row Sebastien Vahaamahina, who was sent off for smashing his elbow into the face of flanker Aaron Wainwright in a needless moment of foul play.

Just like Wales captain Sam Warburton's red card in the semi-final between the teams in Auckland in 2011, the dismissal - with France leading 19-10 - proved to be game-changing.

"It was another example of us forgetting how to lose," said Gatland, whose 12-year tenure as head coach looked to be ending with a disappointing defeat. "Our players never give up, they just keep on fighting to get the result.

"The red card was significant but it sometimes galvanises teams as well. Rugby is a heat-of-the-moment game and it was an error of judgement, which can happen. But hats off to France, they were unlucky.

"It's ironic that the last time we met in the World Cup the result hinged on a red card. I was nervous and was preparing what I was going to say.

"We didn't play as well as we can but now we can prepare for the semi-final. Alun Wyn Jones said we were 240 minutes from doing something special. Now we're 160 minutes and that must leave you excited."

Wales will need a vast improvement at Yokohama next weekend if they are to overcome South Africa, let alone think about a final against either England or New Zealand, who set-up their semi-final clash with emphatic victories.

Even without centre Jonathan Davies - ruled out just before the game after aggravating a knee injury - Wales were expected to see off France and avenge that painful 2011 defeat. But how badly Davies's calmness and experience was missed in a nightmare opening 40 minutes  for Wales.

Centre Virimi Vakatawa ran amok in the Welsh midfield as poor kicking and a general sloppiness was ruthlessly punished. This was France at their brilliant, marauding best with two tries inside eight minutes. Vahaamahina powered over from close-range then Vakatawa's incisive break eventually sent flanker Charles Ollivon racing in under the posts.

Wales did respond on 12 minutes when hooker Guilhem Guirado spilt the ball in a crunching tackle and Wainwright picked up to sprint home from 48 metres. What a time to score your first test try.

Biggar reduced the deficit to one point with a penalty but just as Wales looked to be getting on top - and playing the controlled game they wanted from the start - they suffered another injury blow as number eight Josh Navidi limped off with a hamstring injury.

Moriarty had barely been on the pitch when he was yellow-carded for a high tackle on centre Gael Fickou. France immediately took advantage as Vakatawa used the extra numbers to cut inside for a try.

With Wales desperately trying to hang on until half-time, France could have gone for the kill when they won another penalty but instead of kicking for touch fly-half Romain Ntamack went for the three points. He hit a post for the second time in the half.

"It was a big moment," said Gatland. "If they had gone to the corner and got some success it would have possibly been game over." 

Wales overturned a 16-0 deficit in Paris In February to triumph 24-19 and claim a seventh win in eight attempts against France, thanks to mistakes by Les Bleus that included a reckless long pass by Vahaamahina that George North intercepted to score a try.

This time Vahaamahina was guilty of needless foul play when he elbowed Wainwright having already grabbed him around the neck. He is the first French player sent off in the World Cup.

Biggar kicked a penalty to bring Wales within one converted try but France heroically held on and had chances to score themselves.

Just as time looked to be ticking away, replacement scrum-half Tomos Williams ripped possession from a scrum close to the French line and Moriarty atoned for his earlier card with the try.

Biggar coolly converted to give Wales the lead for the first time in the match, though he had to wait as the officials watched replays, with France claiming a forward pass.

"I have no problem with the decision for the red card," said France coach Jacques Brunel, who refused to discuss his future. "It was a reflex action and he made contact.

"The red card did change the game, but even when we played with 14 men for almost half the match we showed our quality as a team. We showed plenty of courage and had opportunities to score."

RNS ig/bo/sw