England has ripped apart South Africa's top order at the Oval in London to keep them on course for a 2-1 lead in the four-test series.
All rounder Ben Stokes once more led England's charge as the home side bore down on victory in the fourth day's final session.
Two wickets from successive balls in Stokes' third over removed Quinton de Kock (5) and Faf du Plessis (0) and ended South Africa's faint hopes of mounting a rearguard action in pursuit of their target of 492.
Although Stokes failed to record what would have been the first-ever test hat-trick at the Oval, the damage was done.
Du Plessis' wicket, lbw without playing a shot to a first-ball inswinger, was a particular blow.
South Africa needed their captain to survive as they limped to the close on 117-4, still 375 short of their target with a day's play remaining.
The battling Dean Elgar was unbeaten on 72 despite a painful blow to his finger, and Temba Bavuma on 16, as England turned to Moeen Ali to try to secure another breakthrough.
Elgar had been fortunate to survive on nine, dropped by Keaton Jennings at third slip off Jimmy Anderson, and went on to strike seven fours in his 77-ball half-century.
No one else provided much resistance. Before Stokes struck, Stuart Broad removed opener Heino Kuhn for 11 and Toby Roland-Jones dismissed Hashim Amla for the second time in the match, this time having South Africa's danger man sharply caught by Joe Root in the slips for five.
England have a further 98 overs available on the final day to complete the victory and vindicate Root's decision to delay his declaration to apply maximum pressure to South Africa.
England's new captain eventually called time when Jonny Bairstow was dismissed before tea after a breezy 63 which lifted England, who had resumed on 74-1, to 313-8.
If South Africa fail to survive, it will complete a one-sided sequence in each of the tests. England won by 211 runs at Lord's before South Africa hit back with an even more emphatic 340-run victory at Trent Bridge.
The final test starts in Manchester on Friday, Aug. 4.