Hashim Amla (17) was bowled off the penultimate delivery before the interval by left arm spinner Abdul Rehman to dampen a good session for South Africa but captain Graeme Smith was playing solidly for his 28 from 70 balls with four boundaries.
Pakistan were all out for 206 in the first over after lunch to enable South Africa, who batted first and amassed 357, to take a 151-run first innings lead.
Fast bowler Makhaya Ntini took three wickets in an over before lunch to leave the home team, down 1-0 in the series, reeling.
Herschelle Gibbs was the first to go in a slow middle session when he was caught behind off Umar Gul for 16 playing a loose shot, Kamran Akmal taking a brilliant diving catch in front of first slip.
Smith had a few close calls against leg spinner Danish Kaneria but the South Africans faced no other problems.
Left arm spinner Paul Harris completed the Pakistani rout when he had last man Mohammad Asif caught at forward short leg to finish with 3-57. Ntini took 3-42.
Pakistan who resumed on a precarious 140-4, lost Inzamam-ul-Haq (14) and captain Shoaib Malik (1) in the space of five overs to Jacques Kallis and Dale Steyn before Misbah-ul-Haq scored 41 to shore up the innings.
However, Ntini, dropped from the team during this year's 50-over World Cup and last month's Twenty20 tournament due to poor form, dismissed Misbah, Umar Gul and Danish Kaneria in his second over of the day at the total of 189 to put the visitors on top.