World Cup - Boks beat Wales by one point in thriller
However the win will have sent a message that the holders are not going to relinquish their grip on the Webb Ellis trophy easily.
The try was the only real scoring opportunity the world champions got in the second half of the Pool D clash as the Welsh dominated territory and possession and hammered away continuously at the resilient line of green-shirted defenders.
Wales, who so nearly pulled off what would have been their second victory in 26 Tests against the Springboks, may also feel hard-done-by after a controversial decision from the officials cost them a potential three points.
Full-back James Hook, who slotted three penalties and converted rampaging number eight Toby Faletau's try, was not credited with another penalty despite television replays suggesting the ball may have snuck inside the posts.
Several of the Welsh players said they felt the first-half kick had been successful, as did their coach Warren Gatland.
"I thought it was interesting at half-time when we went into the tunnel and as coaches we were saying that we thought it went over," Gatland said.
"(South Africa full-back) Frans Steyn walked past us and said 'yeah I thought it went over as well'. Look, it happens in sport... That's why we're all involved in it. You take the good with the bad."
Gatland also pointed to two other missed opportunities his side had to win the match as probably having more of an effect on the outcome.
Fly-half Rhys Priestland erred with a drop-goal attempt and Hook also missed a late penalty, both while they were trailing 17-16.
"That (first-half) penalty was potentially costly, but we missed a drop-goal in front of the posts and James missed a shot at goal (towards the end) that could have won it for us.
"That's the drama of sport, it's not all predictable."
Despite telling everyone they would play to their strengths of creating pressure inside the opposition's half through a tough forward pack and tactical kicking game, South Africa cast away their conservative play book in the opening minutes.
They spread the ball wide and were rewarded when they stretched the Welsh defence on the left and Frans Steyn barrelled through the tackle of Shane Williams and over Hook to score in the third minute.
Fly-half Morne Steyn converted from wide out to give the world champions a 7-0 lead and they looked like they were going to run away with the match.
But Wales, who had been mindful of allowing the Springboks to consistently keep the scoreboard ticking over, settled and spent the majority of the match inside South Africa's territory.
They initially tried to spread the ball wide but found the aggressive defensive line and individual rush defender cutting down their options and their play became too lateral.
They then changed tactics with inside centre Jamie Roberts coming from deep and hitting the ball flat, which gave them momentum beyond the advantage line, while Faletau was also used prominently to create go-forward.
Faletau's 54th-minute try gave the Wales fans hopes of an upset, but it only served to sting the Springboks into action and they strung together several phases with Hougaard finishing off with a swan dive under the posts.
Morne Steyn converted to give the Springboks a 17-16 lead with 15 minutes remaining and they held on for a morale-boosting victory.
"It's really only about results at the World Cup," Springboks captain John Smit said.
"We didn't get much of a chance to play rugby. The performance was not the best but it is a win and we will take a lot out of that.
"A win in a World Cup like that is worth more than running away with it by 40 points."
2' F Steyn try: South Africa 5-0
3' M Steyn conversion: South Africa 7-0
9' Hook penalty: South Africa 7-3
18' M Steyn penalty: South Africa 10-3
32' Hook penalty: South Africa 10-6
50' Hook penalty: South Africa 10-9
53' Faletau try: Wales 14-10
54' Hook conversion: Wales 16-10
65' Hougaard try: Wales 16-15
66' M Steyn conversion: South Africa 17-16