Aiden Markram hit a half-century as South Africa recovered from the early loss of stand-in captain Dean Elgar on the first day of the third and final Test against Pakistan on Friday.
Markram made a stroke-filled 78 not out in a South African total of 108 for one at lunch.
Elgar was caught behind off Mohammad Abbas for five in the second over after winning the toss and deciding to bat on easily the best pitch for batsmen in the series.
Markram, who had to pass a fitness test after suffering a badly bruised right thigh while fielding in the second Test in Cape Town, gave a sharp chance to short leg Shan Masood off Mohammad Amir when he had two, but otherwise looked in command on an easy-paced surface.
Markram hit 14 boundaries off 101 balls in an innings marked by crisply-struck drives and clips to leg.
Hashim Amla was content to play a supporting role and made 22 not out in a partnership which was worth 102 at lunch.