Duanne Olivier took his tally of wickets in the series to 24 as South Africa completed a 3-0 whitewash over Pakistan with a 107-run victory on day four in Johannesburg.
Olivier (3-74) accounted for Babar Azam with a vicious short ball and then smashed Sarfraz Ahmed's off stump next delivery after Pakistan resumed on 153-3 chasing 381 for a consolation victory.
Top-scorer Asad Shafiq (65) completed his 23rd Test fifty and second in as many games when he whipped Vernon Philander for four in the second over of the morning.
But Philander then had the batsman caught at slip as Pakistan were dismissed for 273, Aiden Markram's cracking diving catch at gully to remove Faheem Ashraf off Kagiso Rabada (3-75) a highlight.
Olivier proved Pakistan's nemesis throughout the three Tests, ending the series with an average of 14.70, a strike rate of 22 and a trio of five-wicket hauls.
Shadab Khan (47no) denied the 26-year-old a hat-trick at Wanderers when he drilled him for an excellent straight boundary immediately after the dismissals of Babar (21) and Sarfraz (0).
Sarfraz's golden duck concluded an up-and-down series for him with the bat, the skipper bagging three noughts - including a pair in the first Test at Centurion - and two fifties in six innings.
Sarfraz subsequently saw Shafiq pick out Dean Elgar at slip and then Ashraf (15) and Mohammad Amir (4) edge Rabada to Markram at the gully - Markram's second grab much more routine than his first.
Hasan Ali (22) had some fun - a six over midwicket his best moment - before he was caught and bowled by Rabada, while the match ended in comical fashion when a mix-up between Shadab and Mohammad Abbas (9) saw the latter run out by Markram shortly before lunch.
Watch the first ODI between South Africa and Pakistan, live on Sky Sports Cricket from 10.55am on Saturday.