England suffered another batting collapse but the tourists battled back to limit South Africa to 72-4 at the start of their second innings in an action-packed second day at Centurion.
Having finished off South Africa's tail within three overs in the morning session, England took to the crease chasing 284, with the Proteas owing much to Quinton de Kock's knock of 95 on day one.
However, after Rory Burns and Dom Sibley fell early, Joe Denly (50) – who was dropped on zero – helped steady England's innings, but captain Joe Root (29) conceded his wicket with a slack flick outside off stump.
De Kock was the star in the field for South Africa, taking six catches as the issues that plagued England's Ashes series came back to haunt them again, though the tourists did make it to 142-4.
But a collapse of seven wickets for 39 runs handed South Africa a healthy 103-run lead.
James Anderson, Stuart Broad and Jofra Archer made quick inroads as South Africa lost four wickets inside 15 overs. Still, the Proteas should be confident of victory as they head into day three with a lead of 175 runs.
Sam Curran impressed for England on day one but his figures of 4-58 were matched when he dismissed Vernon Philander (35).
But after frustrating England with the bat on Thursday, Philander made a swift impact with the ball, with a delivery outside off stump flicking Burns' glove on its way through to De Kock.
South Africa's wicketkeeper took his second catch in the next over, sending Sibley walking from Kagiso Rabada's shorter delivery.
Denly got lucky when Rassie van der Dussen put him down in the slips, as Philander finished an exceptional first spell with five successive maidens.
Root and Denly managed to form a solid partnership until lunch, after which England's captain played a sloppy shot that handed Philander his second wicket, and De Kock another catch.
With support from Stokes (35), Denly reached 50 with a superb boundary through the covers, but he succumbed to an inside edge three balls later, and England subsequently crumbled either side of tea.
Anderson claimed a wicket with the first delivery of the Test, and needed just five balls this time around to draw an edge from Aiden Markram.
Broad and Archer soon got in on the act – Jos Buttler taking fine catches to dismiss Zubayr Hamza and Dean Elgar.
Aggressive play from Faf du Plessis (20) got South Africa on the front foot, only for the Proteas captain to pick out Curran in the deep from Archer's bowling as England finished on a high.