Joe Root made a patient half-century as England set South Africa a world record target of 466 to win the fourth and final Test at the Wanderers Stadium on Sunday.
The England captain scored 58 and played an anchor role before he was last man out as England were bowled out shortly before the close for 248.
Root decided not to enforce the follow despite England leading by 217 runs on the first innings.
Fast bowler Mark Wood took five for 46 as South Africa were bowled out for 183 in their first innings.
Quinton de Kock (76) and Dwaine Pretorius (37) kept England in the field for most of the morning and probably made sure England would decide to bat again.
De Kock and Pretorius put on 79 for the eighth wicket and prevented England from wrapping up the innings early.
De Kock scored his fourth half-century of what has been a poor series for the South African batsmen.
His team-mates have contributed only five other 50-plus scores between them.
Vernon Philander was out to the sixth ball of the day, reducing South Africa to 93 for seven, at which stage a follow-on seemed a strong possibility.
It was an unhappy day for Philander, who will be retiring from international cricket at the end of the match.
Apart from his early dismissal for four, he received a fine of 15 percent of his match fee for his 'send-off' of Jos Buttler on the second day and he then pulled up with a hamstring injury after bowling just nine balls in the second innings.
He left the field immediately and was sent for a scan.
Despite the loss of their leading bowler, South Africa bowled and fielded better than in the first innings when England scored 400.
Left-arm seam bowler Beuran Hendricks claimed a five-wicket haul on debut, finishing with five for 64 when Root was last man out to a sensational diving catch by South African captain Faf du Plessis at a wide slip.
Ben Stokes, Sam Curran and Mark Wood all batted with freedom as England stretched their lead despite losing wickets at regular intervals.
Typically at the Wanderers, there was some uneven bounce as cracks opened up, which will make South Africa's task virtually impossible.
With two days remaining, England are well-placed to complete a 3-1 series win.