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.
Just four months after losing at home to Italy in the Guinness Six Nations, Wales will rightly view the tour as being successful in so many ways, particularly with one eye on next year’s World Cup.
And they also made history through their victory in Bloemfontein that saw them become the first Wales team to beat the Springboks on South African soil.
Ultimately, though, South Africa had too much in the tank for a Wales team that gave it everything and generated plenty of optimism for Pivac as the World Cup countdown continues.
Wales suffered a late blow when number eight Taulupe Faletau was ruled out after the warm-up, suffering an injury to his side, with Josh Navidi replacing him and Taine Basham joining the substitutes.
Gareth Anscombe – Wales’ second Test matchwinner when he kicked a late touchline conversion – missed out because of a rib injury, so Rhys Patchell took over on the bench, and one enforced change in the starting line-up saw wing Josh Adams take over from the injured Alex Cuthbert.
The loss of such an experienced operator as Faletau would have hit Wales hard, and they almost fell behind in the fourth minute.
Springboks centre Lukhanyo Am kicked into space and wing Makazole Mapimpi gathered before crossing Wales’ line, but replays showed his left foot in touch and the try was rightly ruled out.
Pollard then kicked a short-range penalty, and there was a real intensity about South Africa, with full-back Damian Willemse and Damian de Allende both going close to touching down before relentless pressure was rewarded through a Pollard try that he also converted.
A slippery playing surface made life difficult for both teams, but Wales showed plenty of character and scored from their first attack when Reffell claimed his first Test try following strong approach work by Adams and George North.
Wales’ penalty count quickly mounted up, conceding eight in the first 25 minutes, yet South Africa only held a 10-5 lead, which seemed scant reward for their territorial dominance.
When Wales had possession, they looked to move it quickly, although both sides lost players with injuries as wing Cheslin Kolbe and Wales flanker Dan Lydiate were both forced off.
Biggar kicked a penalty seven minutes before half-time, but South Africa then struck from a close-range lineout, driving Wales defenders backwards before Mbonambi touched down to mark his 50th cap in style.
Pollard added the conversion, and Wales arrived at the interval facing a 17-8 deficit.
Pivac made two changes for the second period, sending on hooker Dewi Lake and prop Sam Wainwright, and another Biggar penalty cut the gap to six points.
South Africa should have scored a third try shortly afterwards, but scrum-half Jaden Hendrikse’s pass was adjudged forward and Am was denied after breaching Wales’ defence.
Biggar completed his penalty hat-trick after 48 minutes, yet South Africa responded within five minutes through a Kolisi try that Pollard converted, and the Springboks led 24-14.
And two more Pollard penalties in the final minutes closed out the game as South Africa ensured a winning send-off into their Rugby Championship campaign that begins against New Zealand in three weeks’ time.