Pakistan skipper Shoaib Malik and his deputy Salman Butt fought hard to avoid the follow-on against South Africa in the first Test at the National Stadium here.
Malik was unbeaten on 61 and Butt on 22 at the interval as Pakistan reached 219-6 at lunch on the third day. The duo brought the home team within 29 runs of avoiding having to bat again.
South Africa made 450 runs in their first innings.
The pair came together at 149-6 with Pakistan staring the follow-on in the face. Malik led the fightback and was ably supported by Butt, with their seventh wicket stand so far worth 70 runs.
Malik drove left-arm spinner Paul Harris for his fifth boundary to complete his half-century off 118 balls. He has so far hit six boundaries and a six during his 131-ball knock.
The six brought Malik to 1,000 runs in Test cricket.
Butt could not open the innings on Tuesday after being hospitalised with stomach pains, but he batted with confidence after coming in at number eight, hitting pacemen Andre Nel and Makhaya Ntini for two boundaries.
Butt, who defied a doctor's advice to take two-days rest, looked in no pain and has so far hit four boundaries.
Resuming at 127-5, the home team lost Abdul Rehman in the eighth over of the day when Nel forced an edge off the bat which was well taken behind the stumps by Mark Boucher. Rehman made nine.
South African captain Graeme Smith made changes but failed to get the seventh wicket as Malik and Butt continued to put their heads down on a pitch which still looked good for batting.
Jacques Kallis hit 155 on the second day to help the tourists put up a commanding first-innings total.