World champions South Africa reserved their best for last as they ended Wales' dream of a Test series triumph by winning the decider 30-14 in Cape Town.
Springboks head coach Jacques Nienaber recalled eight of South Africa's 2019 World Cup-winning team after Wales levelled the series seven days ago.
And it worked a treat as South Africa took the series 2-1 through tries from Handre Pollard, Bongi Mbonambi and Siya Kolisi, with Pollard kicking three conversions and three penalties for a 20-point haul.
Wales battled hard throughout and their defensive resistance often proved heroic, but they could only muster a Tommy Reffell try and three penalties from captain Dan Biggar as they missed out on matching series success for Ireland in New Zealand and England in Australia.