Pakistan were bowled out for 272 in the first innings in the second Test against South Africa at the Rawalpindi Cricket Stadium on Friday.
Pakistan defeated batsman Babar Azam overnight without adding his 77 on the second ball of the day, while Fawad Alam scored three more runs before reaching 45 runs.
Faheem Ashraf scored a brilliant 78 runs.
Fast bowler Ler Enrich Nortje won 5-56 while Keshu Maharaj won 3-90.
Azam bounced Fast du Plessis fast in the second slip for an overnight score of 77 runs.
At lunch, Ashraf was on 54 and Yasir Shah had just scored 84 with Pakistan in an extended session due to Friday prayers.
Azam’s dismissal marked the beginning of a mini-run in which Pakistan lost two wickets for 34 balls with just four runs to spare after restarting Pakistan 145-3.
The second night’s batsman, Alam, was run out when he tried to steal a fast single with the force of a lid but he failed to beat a direct throw from Tamba Bauma at the end of the non-striker.
Alam could only add three times to the night’s score of 42.
Azam, looking for his sixth Test century, hit 12 fours off 127 balls.
Ashraf then added 41 runs with Mohammad Rizwan but once South Africa took the second new ball, Nortje hit again, giving Rizwan a wrong hook catch on the score of 18.
Left-arm spinner Keshiu Maharaj had Hassan Ali for eight. Nortje (3-48) and Maharaj (3-75) were the South African bowlers.
Pakistan took a 1-0 lead in the two-match series after defeating the Proteas by seven wickets in the first Test in Karachi last week.