Quinton de Kock scored his first century since January 2017 to pile further misery on Pakistan and take South Africa to 303, setting the visitors a near-impossible target of 380 to save themselves from a whitewash in Johannesburg.
De Kock hit 129 off just 138 balls to make a mockery of the difficult conditions, dismissing the Pakistani bowlers all over the park at will before finally holing out to deep square leg as he tried to clear the fence off Shadab Khan’s bowling.
The dismissal signalled the end of a 79-run stand between De Kock and Kagiso Rabada.
South Africa’s lead had already ballooned to over 300 at lunch with the score at 232-7.
De Kock and Hashim Amla started from where they had left off last night, with De Kock going at a strike-rate of over 100 for most of the early parts of his innings.
It was only after Amla nicked a Hasan Ali delivery through to wicketkeeper Sarfraz Ahmed for 71 off 144 balls that they were able to address the plundering of runs a little.
De Kock was joined by Vernon Philander in the middle, who did a great job of frustrating Pakistan in his 14-run knock before he was outdone by an almost unplayable yorker by Muhammad Amir.
There were to be no more breakthroughs for Pakistan though as De Kock ended the session on 77 off 91 balls, with Kagiso Rabada on the other end at four.