Pakistan were 17-2 and still trailed South Africa by 245 runs at stumps on day one of the third and final Test of the series at the Wanderers Stadium in Johannesburg.
The home side were looking for quick wickets with the new ball and pacer Vernon Philander did just that by sending opener Shan Masood (2) and one-down batsman Azhar Ali (0) packing on consecutive deliveries.
At the close of play, opener Imamul Haq and nightwatchman Mohammad Abbas were unbeaten on 10 and 0 respectively.
Earlier Pakistan made a resounding comeback to restrict South Africa’s progress with the bat. The visitors were dismissed Proteas for just 262 runs, despite the home side threatening to put up a big score on the board after a bright start.
For Pakistan medium-paced all-rounder Faheem Ashraf was the highest wicket-taker with three wickets. Fast-bowlers Mohammad Amir, Hasan Ali and Mohammad Abbas claimed two wickets each.
Aiden Markram's polished innings of 90 put South Africa on the front foot on the first day as they reached 226 for three at tea after winning the toss and batting on the best batting pitch of the series.
Markram, who had to pass a fitness test after suffering a badly bruised right thigh while fielding in the second Test in Cape Town, looked set for his fifth Test century until he glanced a ball from Ashraf and wicketkeeper Sarfraz Ahmed plucked a good catch diving to his left.
Markram hit 16 boundaries off 124 balls in an innings marked by crisply-struck drives and firm clips to leg. It was the third time in his 15-Test career that he had been dismissed in the nineties.
Hashim Amla (41) helped Markram put on 132 for the second wicket after stand-in captain Dean Elgar was caught behind off Mohammad Abbas for five in the second over.
But as soon as the final session began, things went pear-shaped for the home side as they lost their remaining seven wickets in quick succession while adding just 33 runs to the total.
Abbas provided Pakistan with the first breakthrough in the third session as De Bruyn departed after scoring 49 runs.
Pacer Amir then removed Bavuma for just 8 meaning that half of South Africa's side was back in the hut.
Soon after, Zubayr Hamza's debut innings of 41 runs came to an end as he edged one to Sarfraz off the bowling of Amir.
Philander (1) was initially give not out on a Hasan Ali delivery but a successful review by Pakistan earned their seventh wicket of the innings.
Moments later, Hasan accounted for the eight South African wicket with Rabada making his way back to the pavilion for a duck.
Quinton de Kock (18) miscued a pull shot straight down the throat of deep midwicket — giving Ashraf his second wicket of the innings.
Ashraf also claimed the final wicket of the innings as he dismissed Duanne Olivier for nought.
South Africa already have an unassailable two-nil lead in the three-match series, having won the first two Test of the series in comprehensive fashion.