Pakistan ended the second Test against South Africa with 253 runs for five in 90 overs.
After losing four wickets before lunch, Pakistan slowly recovered to move to 133-4 at tea.
Asad Shafiq put in a fine performance alongside Younis Khan to bring Pakistan to 163-4.
Khan played a sweep off Dean Elgar to notch up his 21st Test hundred, before falling to Vernon Philander after making 111 runs.
Shafiq remained unbeaten on 111 as it ended 253-5 on the first day.