England declared shortly before tea on the fourth day at the Oval after scoring 313-8 and setting South Africa a victory target of 492. In reply, the tourists slumped to 52-4 before Dean Elgar (72) helped his side to 117 without further loss.
With the four-match series level at 1-1, South Africa must try to bat through three sessions to secure a draw or an unlikely victory.
England lost six wickets in the afternoon session as its middle-order batsmen stepped up the run rate. Jonny Bairstow struck 63 from 58 balls, Ben Stokes chipped in with a useful 31 from 38 and new bowling star Toby Roland-Jones managed an unbeaten 23 from 19 deliveries.
Debutant Tom Westley made 59 and captain Joe Root scored 50, while Keshav Maharaj was the pick of the South Africa attack with 3-50.
South Africa's best bowler, Vernon Philander, has been plagued by food poisoning throughout this match and bowled 15 overs, but could not take a wicket as the surface flattened out.
Back in the field after tea, the home side made an ideal start to the final session.
South Africa opener Heino Kuhn was bowled by Stuart Broad for 11 in the sixth over and Hashim Amla (5) followed 10 overs later, caught by Joe Root in the slips off a Roland-Jones delivery.
More punishment followed at the end of the next over, with Stokes taking two wickets in consecutive balls. A yorker sent the bails flying for Quinton de Kock (5) and skipper Faf du Plessis promptly went first ball, trapped lbw after he chose not to play a stroke.
However, help was at hand for South Africa. Opener Elgar steadied the tourists' nerves with a dogged performance when they needed it most, helped at the other end by Temba Bavuma (16), giving their team some hope for what promises to be a tough final day.
First Published: July 31, 2017, 1:18 AM IST