Anrich Nortje took five wickets as Pakistan were dismissed for 272 but South Africa’s struggles with the bat in the sub-continent continued as they limped to 106 for four at the close on the second day of the second test in Rawalpindi on Friday.
Captain Quinton de Kock (24 not out from 11 balls) and Temba Bavuma (15 not out) survived in the gloom at the close, but the tourists still trail by 166 runs and will be looking for a counter-punch on day three.
South Africa have passed 300 just three times in their last 25 innings on the sub-continent, and have been prone to spectacular collapses, as they seek to level the two-match series after a seven wicket defeat in the first test in Karachi.
Nortje (5-56) was superb with the ball, his aggression and accuracy leading to a third five-wicket haul in tests to restrict Pakistan to a manageable first innings score.
South Africa’s openers Dean Elgar (15) and Aiden Markram were positive at the start of the innings, but disaster struck as they lost two wickets in the final two balls of the middle session.
Elgar was caught by wicketkeeper Mohammad Rizwan off the bowling of Hasan Ali (2-29), and the very next delivery Rassie van der Dussen was deceived by a ball that kept low and clattered into his stumps.
Faf du Plessis (17) looked in control until he inexplicably tried to cut a wide Faheem Ashraf delivery and edged to Rizwan.
The visitors were dealt a further blow when left-arm spinner Nauman Ali deceived Markram (32) and the latter chipped a simple catch to Shaheen Shah at mid-wicket.
Pakistan had resumed their innings on 145 for three but lost their two set batsmen from the day before in quick succession.
Captain Babar Azam (77) edged the second delivery of the morning from Nortje to Du Plessis at second slip, before the centurion from the first test, Fawad Alam (45) was run out by a direct hit from Bavuma.
Babar and Fawad had put on 127 for the fourth wicket to rescue the home side from a precarious 22 for three on the first morning.
Faheem Ashraf picked up the momentum with a superb unbeaten 78, but ran out of partners as Nortje chipped away at the wickets column to leave the home side all out just before tea.