Pakistan quick Mohammad Asif, who had a one-year doping ban overturned last month, took all four wickets as South Africa reached 254-4 at stumps on Friday on Day Two of the first Test.
Ashwell Prince (77 not out) put on a 90-run partnership with Hashim Amla (71) and an unbeaten stand of 111 with Herschelle Gibbs (58 not out) to steer South Africa to 59 runs shy of Pakistan's 313. Prince hit 10 fours in 144 balls, Gibbs and Amla each hit 11 boundaries at the Centurion Park.
Asif had 4-58 off 16 overs.
Pakistan had resumed on their overnight 242-5 before captain Inzamam-ul-Haq was caught hooking by Amla at square leg off Makhaya Ntini for 42. Akmal mistimed a pull off Ntini and was caught by Shaun Pollock for 29. The tail-enders pushed the total past 300, with Rana Naved-ul-Hasan scoring 30 off 29 balls before he was caught-and-bowled by Andre Nel. Ntini picked 5-83, his 16th five-wicket test haul.