Seamer Hasan Ali took a career-best 10 wickets in the match as Pakistan blitzed South Africa with the new ball on Monday to complete a 95-run victory in the second and final Test in Rawalpindi and claim the series 2-0.
Chasing a target of 370, which would have been a test record in Pakistan, South Africa was well placed at 241 for three just after lunch on the fifth day following a century from Aiden Markram (108).
But when the home side took the new ball, Hasan (5-60) and Shaheen Afridi (4-51) decimated the South African middle order with expert swing bowling, dismissing the visitor for 274.
Hasan took career-best figures of 10-114 in the match as South Africa lost its last seven wickets for the addition of only 33 runs on its return to Pakistan for the first time since 2007.