South Africa was set a target of 182 to win the second test after bowling out Pakistan for 169 on day four at Newlands on Sunday.
Pakistan began the day on 100-3, but lost its last six wickets for the addition of just 22 runs. Vernon Philander followed up his five-wicket haul in the first innings with figures of 4-40 in the second, while Robin Peterson and Dale Steyn each took three apiece in the absence of injured fast bowler Morne Morkel.
Three wickets in three balls put South Africa firmly in command of the second test on Sunday as Pakistan collapsed on the fourth morning at Newlands.
After Robin Peterson had bowled Sarfraz Ahmed at the end of the 65th over, Vernon Philander struck twice at the start of the 66th over to leave Pakistan’s second innings in disarray.
Pakistan went to lunch on 157-8 with an overall lead of just 169 - with tail-enders Tanvir Ahmed and Saeed Ajmal doing their best to prop up the ailing innings.
South Africa now has the opportunity to wrap up the test series, having won the first test in Johannesburg by 211 runs.
Pakistan 338 and 169 (Azhar Ali 65, Misbah-ul-Haq 44; Vernon Philander 4-40, Dale Steyn 3-38) lead South Africa 326 by 181 runs.