Hasan Ali took career-best figures of 10-114 in the match as South Africa lost their last seven wickets for the addition of only 33 runs on their return to Pakistan for the first time since 2007.
The 2-0 win is only Pakistan’s second over South Africa in 12 Test series, having lost eight and drawn three. Pakistan’s only previous series win over South Africa was in a two-match series at home in 2003.
The series against South Africa — who were touring Pakistan for the first time in 14 years — is the biggest hosted by the home side since attack on Sri Lanka’s squad in Lahore halted international tours.
The two teams will now play three Twenty20 internationals on February 11, 13 and 14, all in Lahore.