Jacques Kallis and Herschelle Gibbs shared a 78-run fifth-wicket partnership which ended immediately after lunch when Gibbs was caught at slip off the bowling of Mohammad Asif for 40.
Asif made the new ball count again soon afterwards, trapping Kallis leg before wicket for 91. He finished the session on 4-53 off 32 overs.
South Africa went from 191-4 at lunch to 205-6, with Boucher and Pollock also having to face the new ball.
Boucher reached 42 off 81 balls, and Pollock 31 off 61 to take the lead to 136.
Pakistan was dismissed in its first innings for 265 on day two in reply to South Africa's 124.
Ashwell Prince was the only wicket to fall in the morning's play, trapped leg before wicket for 22 by Danish Kaneria with the score on 117.
Gibbs batted carefully for his 39 but drove recklessly off Kaneria when he had 22. The ball fell just short of Inzamam-ul-Haq at wide mid-on.
South Africa won the first of three tests.Reuse content