Pakistan were struggling to avoid the follow-on after being reduced to 127 for five by South Africa, who made 450 runs, on the second day of the first test on Tuesday at the National stadium in Karachi.
Captain Shoaib Malik (9) and Abdul Rehman (1) were at the crease with the home side still requiring another 124 runs to make the visitors bat again.
South Africa, riding on a brilliant 155 from Jacques Kallis and 77 from AB de Villiers, dominated the second day's play with left-arm spinner Paul Harris getting prodigious turn and bounce on the uneven surface to snap up openers, Kamran Akmal (42) and Mohammad Hafeez (34).
He was well supported by pacers, Andre Nel, Kallis and Dale Steyn who took a wicket each.
Harris came into his own after the makeshift pair had plundered 71 runs in quick time.
Harris trapped Akmal leg before with an armer and than picked up Hafeez to a catch by Kallis at first slip to leave Pakistan reeling on 84 for two in the final session after the home side had gone to tea on 17 for no loss.
Two runs later Nel delivered a body blow by bowling Younis Khan (6). Faisal Iqbal (7) got an inside edge to his stumps off Kallis to leave the home side on 97 for four.
Misbah appeared untroubled by the pitch to hit four boundaries as his first scoring strokes but on 23 he chased a wide ball from Steyn to be caught behind.
South Africa looked set for an impregnable total after going to lunch on 385 for five but lost their last five wickets for 58 runs.
Scorecard
South Africa first innings
Herschelle Gibbs c Hafeez b Gul 54
Graeme Smith lbw Hafeez 42
Hashim Amla b Asif 71
Jacques Kallis c Akmal b Kaneria 155
Ashwell Prince c and b Kaneria 36
AB de Villiers b Gul 77
Mark Boucher c Akmal b Rehman 1
Andre Nel c Misbah b Rehman 2
Paul Harris c Akmal b Rehman 1
Dale Steyn b Rehman 0
Makhaya Ntini not out 0
Extras (b-1 lb-6 nb-4) 11
Total (all out in 136.3 overs) 450
Fall of wickets: 1-87 2-109 3-279 4-352 5-373 6-392 7-408, 8-412 9-448
Bowling: Mohammad Asif 26-6-83-1, Umar Gul 21.3-6-60-2 (nb-2), Danish Kaneria 36-3-124-2, Abdul Rehman 31-3-105-4, Shoaib Malik 8-2-31-0 (nb-2), Mohammad Hafeez 14-0-40-1.
Pakistan first innings
Mohammad Hafeez c Kallis b Harris 34
Kamran Akmal lbw Harris 42
Younis Khan b Nel 6
Faisal Iqbal b Kallis 7
Misbah-ul-Haq c Boucher b Steyn 23
Shoaib Malik not out 9
Abdul Rehman not out 1
Extras (b-4 nb-1) 5
Total (for five wkts, 40 overs) 127
To bat: Salman Butt, Mohammad Asif, Danish Kaneria, Umar Gul.
Fall of wickets: 1-71 2-82 3-84 4-97 5-120
Bowling: Dale Steyn 10-1-37-1 (nb-1), Makhaya Ntini 5-0-30-0, Paul Harris 12-6-18-2, Andre Nel 7-1-22-1, Jacques Kallis 4-2-10-1, Graeme Smith 2-0-6-0