South Africa need seven more wickets to win the third Test at the Wanderers and sweep the series after Pakistan were 153 for three wickets at the close of play on Sunday, still 228 runs short of a daunting winning target.
Dale Steyn claimed two wickets and Duane Olivier the other for his 22nd of the series as South Africa removed the top order after Pakistan had made a solid start with a 67-run opening wicket partnership.
Following the two wickets, Steyn moved into the top 10 on the all-time wicket-takers list. He now has 433 wickets which puts him in joint eighth place with Sri Lanka’s Rangana Herath, who has just retired, and England’s Stuart Broad.
Pakistan had been set a target of 381 to win after bowling their hosts out for 303 before tea on the third day of the test in Johannesburg.
They will resume on Monday with Asad Shafiq not out on 48 and Babar Azam on 17.
Imam-ul-Haq and Shan Masood made a positive start to Pakistan's second innings, attacking the South African pace attack before Steyn made a quick double breakthrough.
Imam-ul-Haq got a feint edge as Steyn moved the ball across the left hander and was out for 35 and Shan soon followed back to the pavilion after a television review, adjudged to have got a slight inside edge to another difficult delivery.
Olivier then claimed the wicket of the out-of-form Azhar Ali as wicketkeeper Quinton de Kock took his third catch of the innings.
Olivier is now three wickets off equalling South Africa's 117-year-old record for the most wickets in a three-Test series.
De Kock hit the highest score of the series on Sunday to help South Africa into pole position for a third successive Test win.
He scored 129 off 138 balls for only the second century of the series, following Faf du Plessis’ 103 in the second test in Cape Town last week.
Hashim Amla added 71 after South Africa had resumed day three on 135-5 with 21 from Kagiso Rabada as they provided support to De Kock.
Amla was the first wicket to go on Sunday, touching his glove to a rising delivery from Hasan Ali on a pitch cracking in places and offering uneven bounce.
Rabada featured in a 79-run partnership for the eighth wicket with De Kock.
Punjab youngster Gill ready to take giant strides for India
Captain Mithali gears up for fresh start with new coach Raman
Shankar replaces Pandya for Aus ODIs, Gill receives maiden call-up
Exclusive! Cheteshwar is not normal says his dad