South Africa edged an enthralling World Cup Pool D encounter with Wales as they won through 17-16 in Wellington.
South Africa took the lead as early as the fourth minute as Francois Steyn crossed the line, with Morne Steyn converting, to give the reigning world champions an ideal start.
Wales hit back with a James Hook penalty but were soon penalised themselves and fell 10-3 behind.
The Welsh slowly exerted their authority on the game though and Hook kept them within touching distance with a penalty before half-time.
Wales came out strongly in the second half and went ahead when Toby Faletau breached the Springboks tryline and Hook made no mistake with the conversion to give his side a deserved 16-10 lead.
But South Africa made a string of substitutions and it was replacement Francois Hougaard who crossed the tryline for the winning score.
James Hook had a late chance to give Wales the win with a penalty but the windy conditions in Wellington pushed his effort wide and the world champions held on.
Wales are next in action against Samoa on Sunday, September 18.