Hashim Amla notched his 20th Test century but three wickets for 34-year-old debutant Zulfiqar Babar allowed Pakistan to restrict South Africa to 245 for eight on the opening day of the first Test in Abu Dhabi on Monday.
Khurram Manzoor was unbeaten on 131 and Pakistan ended on 263 for three, a lead of 14 runs over South Africa who were bowled out for 249 early in the morning session.
South Africa will have to dig deep if they are to avoid defeat in the first Test after being reduced to 72 for four wickets in their second innings, still trailing Pakistan by 121 runs, in Abu Dhabi on Wednesday.