Pakistan are all out on 185 and South Africa lead by 77 runs on the second day of the third and final Test against at the Wanderers Stadium on Saturday.
Duanne Olivier took five wickets for South Africa.
Earlier, Pakistan were 111 for five at lunch, 151 runs behind South Africa’s first innings total of 262.
South Africa missed four catches and two run-out chances in the first hour of play.
Opening batsman Imam-ul-Haq and nightwatchman Mohammad Abbas were both dropped twice as South Africa were unable to separate the pair before the morning drinks break.
Two catches went down off Dale Steyn and one each off Vernon Philander and Kagiso Rabada as Pakistan added 36 runs to their overnight 17 for two.
But Olivier broke through with the second ball after drinks when Abbas was caught at third slip for 11 after an 88-minute, 51-ball vigil. Three balls later Asad Shafiq ducked a bouncer but was caught behind off his glove.
Imam fell for 43 when he was caught at second slip off Philander but Babar Azam struck the ball crisply to be 41 not out at lunch off 39 balls.
South Africa have an unassailable 2-0 lead in the three-match series.