South Africa were left with work to do as they were 37-0 in their second innings at lunch on day three of the first Test against Pakistan in Karachi.
The Proteas trail by 121 runs.
The opening pair of Dean Elgar and Aiden Markram were unbeaten at 18 and 16 respectively.
Earlier, the hosts were dismissed for 378 in their first innings with a lead of 158 runs.
The hosts started the proceedings on their overnight score of 308-8 with Hasan Ali batting at 11 and Nauman Ali to open his account. The pacer hit couple of boundaries before being bowled by Kagiso Rabada for 21.
Nauman and Yasir Shah put on a 55-run partnership before the debutante was traped leg before by Keshav after scoring 24.
Rabada and Maharaj each took three wickets finished whereas pacers Lungi Ngidi and Anrich Nortje also dismissed two Pakistan batsmen each as well.
South Africa were dismissed for 220 with Dean Elgar top scoring with 58 whereas Geoge Linde made 35. Faf du Plessis and Kagiso Rabada scored 25 and 21 respectively.
Yasir bagged three wickets for the hosts whereas Shaheen Shah Afridi and Nauman Ali took two wickets each.