Following on, the tourists lost the wicket of Younus Khan before lunch but Azhar Ali and Imran Farhat kept the Proteas' bowlers at bay to move their side on to 87 for two at the interval.
That is still a deficit of 166 runs, with South Africa to bat again, but it helped restore a little confidence after a dismal second day which saw Pakistan bowled out for 156 in reply to their opponents' 409.
The visitors began the third day on 14 for one, 239 runs behind Graeme Smith's side, with Azhar and Younus at the crease.
However, the partnership was broken on 38 by Dale Steyn, with Younus edging to Smith at first slip on 11.
Fears quickly began to grow of another Pakistan collapse but Azhar and Farhat patiently negotiated the remaining overs before lunch to build an unbroken stand of 48.
Opener Azhar was on 27 at the interval with Farhat on 32.