Medium pacer Hassan Ali took a maiden ten-wicket haul to help Pakistan win its first series against South Africa since 2003 with a 95-run victory in the second Test on the fifth and final day in Rawalpindi on Monday.
Hassan finished with 5-60 to record his best match figures of 11-114 and help dismiss South Africa – who were set a daunting 370 to chase – for 274 before the tea break.
Hassan’s new-ball partner Shaheen Shah Afridi finished with 4-51, while spinner Yasir Shah took the last wicket to spark jubilation among the Pakistan players.
Opener Aiden Markram scored a fighting 108 and Temba Bavuma 61.
They put on a 106-run stand for the fourth wicket to give Pakistan a scare.
Markram took a single off the last ball before lunch as South Africa reached the break on 219-3, needing 151 for a win.
But Hassan ripped through the tourists’ batting order, which lost seven wickets for just 33 runs with the second new ball.
Hassan struck with the second over of the new ball to end Markram’s resistance by getting the opener caught in the slip and end his 335-minute fight.
Markram’s fifth Test century – the first outside South Africa – included 13 boundaries and three sixes.
Next ball, Hassan had Quinton de Kock caught in the slip for nought, ending South African skipper’s miserable series with just 46 runs.
This is Pakistan’s only second Test series win over South Africa in 12 attempts, having lost eight and drawn three.
Pakistan won the first Test by seven wickets in Karachi.
The series win also lifts Pakistan to fifth in international Test rankings – the first time they have placed in the top five since January 2017.
South Africa are pushed to sixth from fifth.
The two teams will now play three Twenty20 internationals on February 11, 13 and 14, all in Lahore.