Kagiso Rabada became the youngest South Africa bowler to take seven wickets in an innings as the hosts took charge of the fourth and final Test against England.
The 20-year-old's brilliant seven for 112 helped dismiss the tourists for 342 in reply to South Africa's first innings 475 at Centurion.
South Africa ended day three leading England by 175 runs with nine second-innings wickets intact, finishing on 42 for one wicket with debutant Stephen Cook (23 not out) and Hashim Amla (16 not out).
The only Proteas wicket to fall in their second innings was that of Dean Elgar (one), who edged James Anderson to wicketkeeper Jonny Bairstow.
The day belonged unquestionably to Rabada who confirmed his rich potential and his powers of endurance after bowling 29 overs, in part because the hosts lost seamer Kyle Abbott to a hamstring strain.
Abbott's availability to bowl again in the match was still to be determined.
After Morne Morkel removed Alastair Cook (76) midway through the first session, it looked as though it would be England's morning as they approached lunch with confidence.
Rabada then had Joe Root (76) caught by wicketkeeper Quinton de Kock, two more wickets fell quickly before the break as James Taylor (14) and Bairstow (0) fell to the same combination to leave England teetering at 211 for six.
A rain delay just after the re-start took the players from the field, but when they returned Rabada removed a fluent Ben Stokes (33) with the new ball, caught in the slips by Amla.
The part-time spin of JP Duminy accounted for Chris Woakes (26), before Stuart Broad (five) became Rabada's seventh victim.
Moeen Ali (61) played an excellent rear-guard hand to frustrate the hosts before he became the last wicket to fall, caught at extra cover off Morkel.
Rabada was just the second player in history to take six wickets or more in an innings in both Tests and one day internationals before the age of 21, joining Pakistan great Waqar Younis.
England have already wrapped up the series with an unassailable 2-0 lead.