South Africa were 191 for four in their second innings at lunch on Sunday, 50 ahead, with Jacques Kallis unbeaten on 84 and Herschelle Gibbs on 39.
Ashwell Prince was the only batsman dismissed on a morning, which yielded 76 runs in 32 overs.
Prince was leg before to leg-spinner Danish Kaneria for 22 in the fifth over of the day after only two runs had been added to the overnight 115 for three.
Pakistan missed a great chance to take command of the match when Kallis was dropped by wicketkeeper Kamran Akmal when he was on 63.
Kallis got a faint edge when he pushed forward against Kaneria but Akmal fumbled the ball and it went down.
At that stage, 19 overs into the day, South Africa were only one run ahead.
It was the only blemish by Kallis in a solid innings. He and Prince put on 56 for the fourth wicket and he shared an unbeaten stand of 74 with Gibbs. It took the pair 80 minutes and 130 balls to post a half-century partnership.
Gibbs had an anxious moment on 23 when he drove Kaneria into the covers and Pakistan captain Inzamam-ul-Haq dived forward and held the ball. His teammates rushed to congratulate him but Inzamam immediately indicated the ball had bounced before he caught it.
Fast bowler Shoaib Akhtar again did not take the field with the Pakistan team. There was no word from the management about the results of a scan he had on his left hamstring Saturday.
Pakistan, reduced to three front-line bowlers, kept Kaneria bowling from one end until 12 minutes before lunch when they took the second new ball with the total on 174 for four.