"Test match rugby is all about creating opportunities and capitalising, but unfortunately they kept us out and with their set-piece. they played well", Japan skipper Michael Leitch said.
"Congratulations to the South Africa team - they played their A game and they played it very well".
French lock Sebastien Vahaamahina had been shown a red card in the 49th minute for foul play with his team leading.
"Of course the red card changed the match, of course when we were playing with 14 men it was hard, but I want to stress the quality of this team, their courage".
Flyhalf Handre Pollard landed three penalty goals from the 44th to the 64th minutes to extend the margin to 14-3 before the South Africans finally opened up.
This time it was the Welsh who benefited and edged a one-point game to reach the last four for the third time, having lost to New Zealand in 1987 - when Moriarty's father Paul scored a try in the third-place playoff win over Australia - and France in 2011.
NASA's all-female spacewalk makes history
It would be nearly 20 years until another woman left Earth's atmosphere - Svetlana Savitskaya in 1982 on the Soyuz T-7 mission. He called them his "astrosisters". "Photos will be much more spectacular once we pass through the hatch", she tweeted.
Wales have been planning for this World Cup for years, and those preparations have been particularly focused over the past 18 months.
But just as it looked as if they might hold out for a memorable victory, replacement scrum half Tomos Williams stripped the ball from French hands after a five-meter scrum and Moriarty, villain turned hero, more than made up for his earlier yellow by grabbing it and diving over. Moriarty gathered and barged over for a try converted by Dan Biggar after a review by the TMO.
"We put the pressure on afterwards and saw the game through".
Wales had barely swung a punch but got on the scoreboard when Wainwright scooped up a dropped ball to gallop between the posts for his first worldwide try. "They never give up". A minute later, Vakatawa sidestepped in from an offload by winger Damian Penaud and dived over for a brilliantly try.
Biggar slotted a penalty to bring the Six Nations champions to within two points.
Then came their self-inflicted implosion, sparked by Vahaamahina's moment of madness.
They lost one man for risky play in the second half, but Wales still struggled to gain the upper hand. "We just hung in there".