James Anderson and Stuart Broad led the way as England dug themselves out of trouble in the second Test at Newlands - with Ben Stokes on the brink of a record. (More Cricket News)
After being bowled out for 269 in their first innings, England allowed South Africa to recover from a vulnerable 40-3 as Dean Elgar and Rassie van der Dussen piled on 117 for the fourth wicket.
But a rush of five wickets after tea allowed England to reassert themselves in the contest, South Africa ending day two in Cape Town on 215-8 and thoroughly rattled.
Stokes' four catches in the innings put him one short of becoming the first English fielder - other than wicketkeepers - to take five in a Test innings.
The day's play ended with Anderson's third wicket as he had Keshav Maharaj caught by Dom Sibley at third slip.
Anderson's 3-34, Broad's 2-36 and Sam Curran's 2-39 showed up South Africa's limitations against England's seam attack, while heavily-worked spinner Dom Bess took the key wicket of Dean Elgar, who made 88 before skying one to the tourists' captain, Joe Root.
England, on 262-9 overnight, predictably did not go much further, adding only seven runs before Anderson edged a snappy delivery from Kagiso Rabada to Van der Dussen at first slip.
Anderson and Broad were reckoned by some observers to have been fighting for one place in this match, but with both getting the nod it was a familiar attack that awaited South Africa.
The knowledge of what was coming did not help the Proteas in the early stages, however. Broad immediately found his range and had Pieter Malan and Zubayr Hamza caught in the slips, both men gone for five apiece with Root and Stokes holding the catches behind the bat.
When Anderson struck a huge blow by removing home captain Faf du Plessis for just one run - Stokes again taking the catch - England had South Africa on the rack.
England thought they had snared Van der Dussen when he was caught in a tangle by a tasty Anderson delivery, only for a review to show the batsman had managed an inside edge.
Van der Dussen had another life on 16 when Broad looked to have him caught behind, yet the England paceman had overstepped by a couple of inches, and the same batsman was dropped by Stokes.
Just when it looked like Elgar would go to three figures, he lost patience after half an hour of England stemming the flow of runs, took a big swing at Bess and Root snaffled a patient catch at deep mid-off.
Curran got in on the act, having Quinton de Kock caught at mid-off by Anderson and finally removing Van der Dussen, whose luck ran out on 68 when Stokes held a fine low catch down to his right.
Anderson accounted for Dwaine Pretorius, with Stokes redeeming himself for a drop at the start of the 81st over by gobbling up a chance off the Lancastrian three balls later, and Anderson's next strike made it marginally England's day.