The lower-order increased Pakistan’s lead to 200 runs against South Africa on the third day of the second and final Test on Saturday.
All-rounder Faheem Ashraf and Mohammad Rizwan featured in a 52-run sixth-wicket stand, guiding the hosts to 129-6 at stumps.
Earlier, fast bowler Hasan Ali (5-54) helped the hosts dismiss South Africa for 201, a lead of 71.
The scores: Pakistan 272 & 129/6 in 51 overs (Azhar Ali 33, Mohd. Rizwan 28 batting, Faheem Ashraf 29, Linde 3/12)) vs South Africa 201 in 65.4 overs (A. Markram 32, T. Bavuma 44 n.o., Q. de Kock 29, W. Mulder 33, Hasan Ali 5/54).