Dom Sibley scored a maiden century to put England on top, but South Africa have launched a stubborn rearguard defence to keep the tourists' victory charge at bay.
The hosts closed day four of the second test on 126/2, after they were set a record target of 438 for victory at Newlands.
They now require a further 312 runs in 90 overs to achieve the highest run chase in test cricket history.
More likely, though, they will have to bat out the final three sessions to save the match.
Debutant opener Pieter Malan is unbeaten on 63 and is at the crease with nightwatchman Keshav Maharaj (2no) on a wicket that has flattened considerably for the seamers, but is offering turn to the slow bowlers.
Dean Elgar (34) and Zubayr Hamza (18) are the two players out, the latter in the penultimate over of the day, when he edged James Anderson to wicketkeeper Jos Buttler.
South Africa famously scored 438 to beat Australia in a one-day international at the Wanderers in 2006, with current coach Mark Boucher hitting the winning runs.
But this would represent an even bigger achievement for a side that has lost many of its batting greats to retirement in recent years.
The current highest success run chase in tests was 418 by West Indies against Australia in 2003.
England set the stiff target, after declaring their second innings on 391/8 just after lunch, with opener Sibley unbeaten on a patient 133 to go with an explosive 72 from Ben Stokes.
Sibley's hundred was met by an almighty roar from the sizeable travelling English support, even if it took him 269 balls to get there.
Stokes was providing plenty of entertainment at the other end, as he took on the task of providing the quick runs England wanted to build a big enough lead and still have enough time to bowl South Africa out a second time.
He smashed seven fours and three sixes in a 47-ball innings of 72, before being caught at mid-on by Rassie van der Dussen off spinner Keshav Maharaj.
His blitz propelled England to 157 runs in 27 overs in the morning session and crucially sped up the game in their pursuit of victory.
South Africa won the first test of the four-match series by 107 runs in Pretoria.
Reuters