Fast bowler Dale Steyn took six for eight, his best figures at home, as Pakistan were bowled out in 29.1 overs four runs short of their previous worst innings total.
Graeme Smith then decided he would not enforce the follow-on and at the close his side were 207 for three in their second innings.
Openers Smith and Alviro Peterson (27) raced to 82 before the latter skied an Umar Gul delivery and Mohammed Hafeez completed the catch.
Smith reached his 37th Test 50 before he was caught behind by Sarfraz Ahmed two runs later and Jacques Kallis (7) perished trying to force the scoring rate when he was caught in the deep by Asad Shafiq.
Hashim Amla (50 not out) and AB de Villiers (63 not out) then put on 108 runs to take South Africa to the close.
Steyn dismissed Mohammed Hafeez (six) in his first over of the day as the opener got a faint edge that went straight through to de Villiers, one of a joint South African record of six dismissals in the innings for the keeper.
Debutant Nasir Jamshed (2) was trapped in front by Steyn and, although the batsman challenged the decision, the third umpire upheld the dismissal.
Younus Khan (0) lasted just five balls before he pushed forward to a full Steyn delivery and edged to Smith at first slip to leave Pakistan reeling at 12 for three.
Azhar Ali and captain Misbah-ul-Haq took the score to 36 when Azhar (13) fended a vicious bouncer from Kallis to de Villiers.
Misbah (12) became Kallis' second victim in controversial circumstances after Billy Bowden gave a caught behind decision not out and South Africa reviewed. There appeared to be no evidence of a nick on the hot spot replay but third umpire Steve Davis from Australia chose to overturn the decision.
Asad (1) was next to go as he chased a wide delivery from Vernon Philander and succeeded only in edging to de Villiers. Two balls later and a reckless Gul (0) flayed at another wide delivery off the same bowler, Smith pouching the catch.
By lunch Pakistan had stumbled to 40 for seven and just two balls after the interval Saeed Ajmal (1) became Steyn's fourth victim, this time de Villiers pulling off a wonderful diving catch in front of first slip.
Steyn got his fifth when he induced an edge from Sarfraz (2), before the sorry innings came to a close when Rahat Ali edged to Faf du Plessis in the slips and was out for a duck. Steyn was once again the wicket taker.
- Related links