In response to South Africa’s first innings total of 220, Pakistan was bowled out for 378 on the third day of the opening test in Karachi on Thursday.
Pakistan added a further 70 runs for the loss of two wickets to restart at 308-8, extending their lead to 158.
Kagiso Rabada, a South African fast bowler, finished with 3-70, completing his 200 wickets in 44 tests by denying Hasan Ali for 21.
The eighth South African bowler to take 200 or more Test wickets is Rabada.
On Wednesday, after scoring his first Test century at home, Fawad Alam led Pakistan’s recovery against South Africa.
Fawad hit the landmark, his third hundred in test cricket, with Keshav Maharaj’s six-over-long-to-left-arm spinner.
The two-match test series is South Africa’s first for 14 years in Pakistan. The second test will commence in Rawalpindi on the 4th of February.
In Pakistan, the hosts have won just one of their previous seven tests against South Africa, with the visitors recording two wins to go with four draws.