Ryan Rickelton scored the joint seventh-highest total by a South African in Tests with 259 runs, helping his team post 615 before reducing Pakistan to 64 for four at stumps on day two of the second test at Newlands on Saturday.
Pakistan lost three wickets and faced further setbacks as opener Saim Ayub missed the match due to an ankle fracture sustained during fielding on day one. The visitors trailed by 551 runs at the close.
Babar Azam remained unbeaten on 31 and was set to resume with Mohammad Rizwan, who was on nine, as Pakistan attempted to recover from their precarious position.
Seamer Kagiso Rabada took two of the three wickets to fall, removing Pakistan captain Shan Masood for two and Saud Shakeel for a duck, both caught at first slip by David Bedingham. Marco Jansen dismissed Kamran Ghulam for 12, forcing him to chop the ball onto his stumps.
The day, however, belonged to Rickelton, who registered his highest first-class score during a 10-hour stay at the crease. Facing 343 balls, he hit 29 fours and three sixes. His innings included partnerships of 235 runs with captain Temba Bavuma, who scored 106, and 148 runs with Kyle Verreynne, who made 100.
Rickelton, promoted to open the batting after Tony de Zorzi’s injury, eventually fell while attempting a tired shot against Mir Hamza, lofting a catch to Mohammad Abbas at mid-on.
Earlier, David Bedingham departed early in the day for five, edging Abbas to Rizwan, who claimed six catches in the innings. Verreynne then attacked the tiring Pakistan bowlers, bringing up his fourth test century from 144 balls, including five sixes, before falling to Aamer Jamal at midwicket off Salman Agha.
Marco Jansen added 62 runs from 54 balls, and Keshav Maharaj chipped in with a quick 40 off 35 deliveries as South Africa pushed for quick runs.
South Africa, having secured a place in the World Test Championship final at Lord’s in June, aimed to seal the series 2-0 after winning the first test in Pretoria