Ryan Rickelton scored his fourth test ton and Kagiso Rabada smashed a career-best 72 from number ten as South Africa seized control of the first test against Bangladesh on day four at the Wanderers on Wednesday.
The Proteas, resuming on a precarious 386/7 and still 14 behind, powered to 557 all out, with a lead of 157.
Bangladesh then slumped to 100/5 when bad light ended play early, still 57 runs in arrears.
Rickelton made 102 from 165 balls with 13 fours, while Rabada, who had only one previous test fifty in 75 matches, hit 10 fours and two slog-swept sixes off Mehidy Hasan Miraz.
The pair added 117 for the eighth wicket.
Rabada was dropped on 38 by captain Najmul Hossain Shanto and Rickelton took charge with a series of pulls and drives. Number 11 Dane Paterson then hammered 29 off 27 balls, including two fours and two sixes.
Das, who had taken six catches in the innings, also stumped both Rickelton and Rabada to complete a world-record eight dismissals in an innings.
Bangladesh’s second innings started badly.
Marco Jansen removed Tanzid Hasan for four, Rabada bowled Mominul Haque for one, and Simon Harmer dismissed Shanto with a ball that spat off the pitch.
Harmer later bowled debutant Mahfijul Islam for 32 and Rabada removed first-innings centurion Towhid Hridoy with a fierce bouncer.
Mushfiqur Rahim (5) and Litton Das (12) will resume on day five with the Proteas eyeing victory.