Johannesburg: Quinton de Kock's fourth Test century put South Africa in a strong position to complete a 3-0 Test series sweep over Pakistan, who showed late resilience on day three in their battle to avoid defeat.
Wicketkeeper-batsman De Kock equalled his Test-best score of 129 as the Proteas posted a second-innings total of 303, leaving the tourists a daunting target of 381.
Hashim Amla had his influence with a deliberate 71 off 144 conveyances previously being gotten behind by wicketkeeper Sarfraz Ahmed, whose contribution in 10 rejections in a match set another record for Pakistan.
Dale Steyn struck twice in nearness to expel openers Imam-ul-Haq (35) and Shan Masood (37) and move into the main 10 rundown ever Test wicket takers on 433.
However, Azhar Ali (15) was the main other wicket to fall and, while they require another 228, Asad Shafiq (48 not out) and Babar Azam's (17no) organization drove the sightseers to 153-3 at the near hold an outside shot.
In the wake of scoring at a run-a-ball rate to make 34 medium-term, De Kock was considerably more estimated at an opportune time Sunday against a testing Pakistan knocking down some pins unit.
Amla's consistent work finished when he gloved a Hasan Ali conveyance, while Vernon Philander (14) hit three fresh limits previously being caught lbw by Mohammad Amir.
De Kock managed four limits previously lunch however Mohammad Abbas was smacked for three more as the pace of scoring grabbed in the second session.
A couple of nerves pursued as the individual milestone drew nearer before De Kock at long last bored one to the fence to raise his century. He in the long run holed out off Shadab Khan, having hit a singular six and 18 fours.
Kagiso Rabada (21 off 62) had been a solid accomplice however South Africa's innings collapsed in a rush, their last three wickets going down for one run.
Steyn made his check to break Pakistan's opening stand when Imam got a thin edge behind to wicketkeeper De Kock.
A seething Masood before long pursued when innovation was required on a South Africa audit for a catch behind, yet there was less uncertainty about Azhar's wicket as he gloved behind a rising conveyance from Olivier.
However Shafiq, who hit Olivier for three fours of every one over to take Pakistan past 100, and Babar shook along in an unbeaten 49-run stand, giving the guests a hint of something to look forward to heading into Monday's play.