LIVE UPDATE: Pakistan v SA Day 1
Leg-spinner Imran Tahir took a career-best 5-32 while fit-again paceman Dale Steyn finished with 3-38 after Pakistan won the toss and decided to bat at Dubai stadium.
For Pakistan, tail-ender Zulfiqar Babar top-scored with 25 not out while Shan Masood made 21.
Pakistan lead the two-match series 1-0.
Earlier, Leg-spinner Imran Tahir and paceman Dale Steyn shared five wickets between them as Pakistan were tottering at 60/6.
Steyn recovered in time to get two early wickets before Tahir, playing his first Test in 11 months, wrecked the middle-order with three wickets for 17 runs.
At the break, Asad Shafiq was unbeaten on nought while Adnan Akmal was out in the last over before lunch, without scoring.
Tahir, born in Pakistan before migrating to South Africa, dismissed Shan Masood (21), Misbah-ul Haq (two) and Akmal in the space of just 11 deliveries.
Steyn, cleared from a hamstring injury, had dismissed opener Khurram Manzoor off the second delivery of the match and then had Younis Khan (10), after Pakistan won the toss and opted to bat on a dry Dubai stadium pitch.
Steyn, doubtful to play after sustaining injury on Sunday, gave no signs of discomfort as he dismissed Manzoor with a sharp outswinger, caught at gully by Faf du Plessis.
Manzoor, who hit a career best 146 in Pakistan's seven-wicket win in the first Test in Abu Dhabi last week, failed to score.
Azhar Ali then put on 38 for the second wicket with Masood before he was trapped leg-before by paceman Morne Morkel for 19.
Masood remained steady until he played an over-ambitious drive off Tahir and was bowled off an inside edge.
Steyn returned for his second spell to have Younis, caught behind off a rash shot with the score at 60 before Tahir got two more on the same score.
South Africa were forced to make two changes from the first Test, as star batsman Hashim Amla could not make it after returning home for the birth of his second child.
Amla was replaced by Dean Elgar while left-arm spinner Robin Peterson, who failed to get a wicket in the first Test, made way for Tahir.
Misbah-ul-Haq (captain), Khurrum Manzoor, Shan Masood, Azhar Ali, Younus Khan, Asad Shafiq, Adnan Akmal, Saeed Ajmal, Zulfiqar Babar, Mohammad Irfan, Junaid Khan
Graeme Smith (captain), Dean Elgar, AB de Villiers, JP Duminy, Faf du Plessis, Jacques Kallis, Morne Morkel, Alviro Petersen, Vernon Philander, Dale Steyn, Imran Tahir