Springbok captain Victor Matfield paid tribute to his side's staunch defence as the world champions withstood a late rally from Wales to win 25-29 at the Millennium Stadium.
The victory kept South Africa's hopes of a Grand Slam alive after they brushed aside Ireland last weekend.
South Africa were 17-9 behind at the break but scored 17 unanswered points in the space of seven minutes to grab the initiative from Wales.
Wales refused to cave in and mounted a fierce late rally but couldn't breach the green wall.
"I'm very proud of the boys, they showed great character," said Matfield. "Wales put us under pressure and it was a great game for the spectators to watch.
"Well done to Wales, they really came out and played well. "(Defending) is something we really worked hard on (in training) and it came through and we were happy with that," he added.
Referring to a possible Grand Slam, Matfield said: "I don't know. There's still a fair way to go. We're focusing on Scotland and that's going to be another huge game. We will enjoy tonight and then start fresh from zero on Monday again."
Wales reached their first semi-final since 2013 in the opening round of this season's HSBC World Rugby Sevens Series in Dubai. WRU TV's Graeme Gillespie recaps on what proved to be an eventful tournament
Wales and Ospreys back row James King, who came through the North Wales age grade system, nominated North Wales Regional Community Rugby Manager Marc Roberts, in the WRU's 'Diolch' initiative where squad players thanked those who played a part in their rise to the top.
Beating Merthyr has boosted Carmarthen Quins hopes of reaching a top eight spot in the Principality Premiership. Quins captain Haydn Pugh is delighted with his team's progress and is determined that everyone from the Under 6s through to the senior team, enjoys the ride.
When the Wales squad were asked to nominate individuals who played a big part in their early playing days, Wales and Dragons full back and wing Hallam Amos thought of his former Monmouth School rugby coach John Bevan.
Sam Cross and Luke Treharne have been named as co-captains of the Wales Sevens side as head coach Gareth Williams names his 12-man squad to play in the first leg of the HSBC World Series in Dubai next weekend.
Bedwas head coach Steve Law and players Nicky Griffiths and Alun Rees extol the virtues of the close knit club as they prepare to host third place RGC 1404 - who are one place head of them on the Principality Premiership points table - on Saturday.
Many of the Wales squad have said Diolch (thank you) to someone who played an important part in their early playing days by nominating them to be invited to the Wales v South Africa match. One person, Gowerton Comprehensive geography teacher Mr Dean Mason was nominated by two of his former pupils, Dan Biggar and Sam Davies.
The second WRU disability rugby pilot has been delivered, this time in Caerphilly schools, culminating in a festival at the Caerphilly Centre of Sporting Excellence, Ystrad Mynach tomorrow. Plans are in place to set up a Disability Rugby Club in Newbridge to provide long-term playing opportunities.
WRU TV: Hear from inside the Wales camp as Neil Jenkins discusses this weekend's clash with South Africa and how the squad are looking to put in a strong performance to round of the 2016 Under Armour Series