The tourists reached tea on 104 for four in their second innings, still 375 runs behind but with a chance of denying South Africa victory by the close.
Pakistan, hamstrung by their record lowest Test score of 49 in the first innings, were able to provide a little more resistance second time around.
Although opener Mohammad Hafeez suffered another failure, departing for two to go with his six in the first innings, Nasir Jamshed did much better.
Having put on a swift 40 this morning after South Africa declared on 275 for three - a lead of 480 - he fell four runs shy of his half-century when Dale Steyn had him caught at mid-wicket soon after lunch.
That left Pakistan on 64 for two, and only six runs had been added before Azhar Ali was trapped lbw by Jacques Kallis for 18.
The Proteas were plotting another Pakistan collapse when Younus Khan then went for 15, caught behind off Morne Morkel.
But Misbah-ul-Haq and Asad Shafiq safely saw them through to tea, putting on 22 in the process.
Earlier, AB de Villers, resuming on 63, swiftly advanced to his fifth Test century from 117 balls, while Hashim Amla moved onto 74 before they were called in by captain Graeme Smith.