Opener Imamul Haq struck a brisk unbeaten half-century as Pakistan progressed to 100 for one in their second innings to seize the initiative at tea on day two of the first Test against South Africa at Centurion Park on Thursday.
Pakistan built a lead of 58 with nine wickets remaining as the test continued to move forward at pace after the tourists had bowled out their hosts for 223 on the stroke of lunch.
Imam(57*) and Shan Masood (22*) put on a valuable unbroken second wicket stand of 56 on a wicket already producing variable bounce on the second day.
A fourth innings target of anything over 200 looked likely to be a challenge for South Africa, whose batting frailties have already been laid bare by the high-quality Pakistan seam attack in this match.
The only wicket to fall in Pakistan’s second innings was that of Fakhar Zaman, who matched his first innings score of 12 before flicking a Duanne Olivier delivery to Kagiso Rabada at fine leg.
South Africa were frustrated by a number of edges that fell short of the slip cordon, while Hashim Amla spilled a chance off Imam when he was on 15.
Earlier, Mohammad Amir and Shaheen Afridi took four wickets each as Pakistan kept South Africa in check by restricting their first innings total to 223.
Amir (4-62) and Afridi (4-64) were particularly impressive in getting the ball to move off the pitch, with seven of their eight scalps being caught behind the wicket.
The home side resumed their first innings on 127 for five and looked to take the attack to the visitors early on the second morning, but lost nightwatchman Dale Steyn (23) when he edged Amir to wicketkeeper Sarfraz Ahmed.
Temba Bavuma moved to 53 with some excellent cover drives and intelligent placement, but his stay was ended when the excellent Afridi induced an edge to Ahmed.
Keshav Maharaj (4) was trapped leg before wicket by Hasan Ali (2-70) before a quickfire 19 from Rabada was ended when he attempted a drive off Afridi and was caught at second slip by Asad Shafiq.
Quinton de Kock (45) looked for quick runs to push the lead past 50, but was deceived by a slower ball from Amir and caught at cover by Fakhar.