Oita, Japan: Wales coach Warren Gatland challenged his players to write history after dodging a bullet in a pulsating 20-19 World Cup quarter-final against 14-man France.

The Six Nations champions hit back from a nine-point half-time deficit to reach the last four on Sunday, helped in large part by lock Sebastien Vahaamahina’s red card nine minutes after the interval in Oita.

But Gatland, who is set to bring the curtain down on his successful 12-year spell as coach after the tournament, insisted that the countdown was on for his side to achieve something no Welsh team has ever done before — winning the World Cup.

“We’re excited about being where we are now,” said the New Zealander, whose team will face South Africa in next week’s semi-finals. The Springboks later advanced to the semi-finals with a grinding 26-3 win over Japan, bringing an end to the home team’s entertaining run at the first Rugby World Cup staged in Asia.

“If you’re in a semi-final of a World Cup (captain) Alun Wyn (Jones) has been saying ‘it’s 240 minutes to do something (you will remember) for the rest of your life’ — well, we’re down to 160 now,” added Gatland, who has led Wales to four Six Nations titles, including three Grand Slams, since taking charge in 2007.

“If you can’t get excited about that, then nothing will excite you. We’ll relish that opportunity. As young men, they’ve got a chance to create something really special.”

Gatland admitted, however, that he had been hastily preparing a farewell speech before substitute Ross Moriarty’s late try, converted by Dan Biggar, broke French hearts.

“You start going through lots of different emotions — what I’m going to say in here, what I’m going to be saying on the TV,” he smiled.

“You’re thinking of those potential scenarios. Definitely went through a lot of emotions today, but I’m really proud of how we hung in there.”

Wales came into the quarter-final desperate to atone for their traumatic 9-8 semi-final defeat by France eight years ago.

That encounter in Auckland also featured a red card, with then Welsh captain Sam Warburton sent off early for a tip tackle on Vincent Clerc.

“It’s ironic that the last time we met in a World Cup was very similar in a one-point game as well,” said Gatland, who kept his counsel on Vahaamahina’s brain freeze.

“I don’t think anyone could complain about that — the officials dealt with it appropriately. Unfortunately that’s what rugby is about,” added the 56-year-old.

The week-long hype over a potential repeat of Japan’s upset over South Africa in 2015, the so-called Miracle of Brighton, was muscled out of reality by a big Springboks line-up that stuck to its attritional gameplan.

With a half-time score at 5-3 it was still anybody’s game. The “epic moments” of Japan’s famous win four years ago were replayed on the stadium screen during the break but it seemed only to remind the South Africans of what was at stake in the second half.

Flyhalf Handre Pollard landed three penalty goals from the 44th to the 64th minutes to extend the margin to 14-3 before the game finally opened up.

Scrumhalf Faf de Klerk scooted over in the 66th after a powerful driving maul from the Springboks had Japan on the back foot, and Makazole Mapimpi added his second try of the match in the 70th to put the result beyond doubt.

Japan, which had won millions of converts to the sport for its high-intensity running rugby, was unable to cross South Africa’s line.

Semi-finals line-up

Saturday, Oct 26

England vs New Zealand

Sunday, Oct 27

South Africa v Wales

Third place play-off

Friday, Nov 1

Losing semi-finalists

Final

Saturday, Nov 2

At Yokohama

Winning semi-finalists.