Left-arm seamer Marco Jansen took a career-best 5-35 as South Africa bowled England out for 158 early on day four of the third and final test at The Oval on Sunday, before moving into the lead on 70 for one at lunch in their second innings.
Captain Dean Elgar was 35 not out and Keegan Petersen on seven with the touring side 30 runs ahead having seen off the new ball in difficult batting conditions.
The game has moved forward at pace with 20 wickets falling in four sessions after day one was washed out by rain and the second was cancelled as a mark of respect following the death of Queen Elizabeth.
Both teams’ first innings lasted 36.2 overs as the seamers made hay on a helpful wicket, but England were frustrated in their search for a breakthrough, not helped by wayward lines that gave the visitors regular scoring opportunities.
There is still plenty in the wicket, and Elgar and fellow opener Erwee (26) rode their luck before the latter edged England captain Ben Stokes to Joe Root at first slip with the score on 58.
England had resumed the day on 154 for seven, but lost their last three wickets in 13 minutes for the addition of four runs.
Kagiso Rabada (4-81) had Ollie Robinson (3) caught by Elgar at short mid-off, before Jack Leach played the ball onto his stumps off the speedster.
Jansen wrapped up the innings when he claimed a first five-wicket haul in test cricket when Ben Foakes (14) edged a delivery to Petersen at third slip.
The series is poised at 1-1 after both teams won by an innings inside three days in the two previous games.