England will head into the third day of the second Test as favourites after South Africa lost four wickets for 24 runs over the final hour of Saturday's final session.
Day two scorecard: Close
England 269 all out: Stokes 47; Rabada 3-68, Preorius 2-26, Philander 2-46, Nortje 2-56
South Africa 215-8: Elgar 88; Anderson 3-24, Broad 2-36, Curran 2-39
England won the toss and elected to bat
England bowled with skill and heart to drag themselves back into contention in the second Test against South Africa, but Stuart Broad paid the price for over-stepping on a hard-fought day in Cape Town.
Having been dismissed out for an under-powered 269 the tourists kept the home side's scoring on a leash and built pressure at either end of day two, with the Proteas reaching stumps 54 behind on 215 for eight.
James Anderson finished with three for 34, Broad struck twice in a tone-setting early blast, while Sam Curran and Dom Bess played sound supporting roles, but the tourists might have been even better set.
They did little wrong with Dean Elgar, an accomplished opening batsman who churned out the accomplished innings of 88, but they will be frustrated not to have made lighter work of his main foil, Rassie van der Dussen.
The pair put on 117 runs during a long barren stretch through the middle of the day but Van der Dussen was fortunate to reach 68. He was fully justified in over-turning an lbw verdict with just six to his name, a big inside edge having been missed in real time, and lucky on 43 to see the ball squirm free as Ben Stokes dived to complete a one-handed catch.
But his real reprieve came when he had only 16 and a brilliantly directed Broad delivery, spitting and rearing in from back-of-a-length, brushed his glove on its way through. He began to walk for the pavilion but turned on his heels once replays showed that Broad had no-balled.
Umpire Paul Reiffel will attract criticism for failing to keep a better eye on the crease line - and there were several other no-balls which went unpunished - but for a bowler playing his 136th Test, this was a self-inflicted wound.
Had his boot landed a couple inches further back South Africa would have been 86 for four and the most profitable stand of the match would have been stopped in its tracks. Either side of their partnership South Africa lost their first three wickets for 40 - Broad striking twice with the new ball - and five for 58 during the evening.
England resumed nine down on 262 and added just seven before Ollie Pope was stranded on 61 - his faith in exposing Anderson to Kagiso Rabada going unrewarded. The total looked light, not least when South Africa ticked off 18 in the first three overs of the reply.
Broad reclaimed the initiative swiftly and got just rewards for a polished six-over spell that proved too good for debutant Pieter Malan and Zubayr Hamza, who both fell for five fiddling outside off stump.
Stokes took a fine low catch to account for Hamza and a simpler second when home captain Faf du Plessis nicked Anderson. One more wicket would have made it a superb session for the English attack and Van der Dussen seemed a ripe candidate, spraying Anderson wide of gully then requiring DRS to reverse the errant lbw.
At the other end the solid Elgar only had one moment of concern, chipping close to Ollie Pope as he mis-read Dom Bess' gentle loosener.
The afternoon proved a disappointment as South Africa added 81 without loss. The timid run-rate owed much to Bess' control, which allowed him to hold his end soundly for 27 overs on his recall, but Broad's wandering feet stifled self-belief for a while. The delivery itself, close to unplayable, deserved so much more.
Van der Dussen would not have reached tea had Stokes held Anderson's next chance, but the ball jerked free of his outstretched hand as he collided with the turf.
England did not allow their hard-won pressure to dissipate after tea, as Broad and Bess stitched together six spartan overs. It was Elgar whose patience ran dry in sight of a century, drawn in by a fuller offering from Bess and swinging hard down towards long-off. Root initially seemed unsteady under a swirling catch but held on cleanly and proceeded to beat his chest and yell out in a mixture of celebration and relief.
Sam Curran seized the opening, drawing a loose shot from Quinton de Kock and finally ending Van der Dussen's stay via another Stokes take at slip. Anderson followed suit as he wrapped up the day in style, cashing in on the second new ball as Dwaine Pretorius and Keshav Maharaj both failed to see stumps.
Sam Curran believes England's plan to choke South Africa's run-rate was the key as a flurry of late wickets handed the tourists the initiative in the second Test.
"I think we bowled really well as group today, we kept the rate down all day," said Curran, who bagged the dangerous Quinton de Kock and the resilient Rassive van der Dussen after tea.
"I thought we reaped the rewards towards the end. We may have got no wickets through the middle session but we knew they would come if we stuck at it."
A key part of England's tactics was the off-spin of Dom Bess, who was not selected for the original touring squad and only arrived as cover for the unwell Jack Leach.
Having impressed the coaching staff in practice he was handed his third Test cap and performed a solid holding role which allowed him to pin down an end for 27 overs and even tempt tops-scorer Dean Elgar (88) into a rush of blood.
"I thought Bessy did an amazing job for us the whole day," said Curran.
"He was the outstanding. He held it together and helped us big lads come in from the top end where there's probably a bit more movement. It's pretty obvious the seamers maybe haven't got as much from that end, so I thought he bowled really well."
Elgar offered a colourful account of his dismissal, but acknowledged it as a likely turning point.
"I felt I played him very well until the brain fart - a big one - then I was sat in the changing room. That all it is," he said.
"It wasn't anything to do with patience. I might have just chosen the wrong ball. I hit him for four a few overs before - great shot wasn't it? - but I picked the wrong one.
"It's not right of me playing shots like that, especially being a senior batter, I shouldn't be putting the guys under pressure like that. But I'm a human being as well...two arms, two legs and the other thing as well.
"I could have blocked it out, blocked out the over and been not out over night, we'd have been totally in control, but I've yet to see someone master this game."