South Africa struggled to 214/5 by stumps on day two of the first Test against England still trailing the hosts by 244 runs with just five wickets in hand.
England's tailenders added some quickfire runs after a brace of early wickets to see the hosts post 453 all out.
South Africa nipped out Joe Root (190) early to swing the game back into the balance with Morne Morkel accounting for the skipper.
Morkel struck again two balls later when he trapped Liam Dawson leg before, the Hampshire man reviewed but the decision stood on umpire's call and England were 367/7.
South Africa would have fancied themselves to restrict England to less than 400 but Stuart Broad rode his luck and together with Moeen Ali (87) added 46 for the eighth wicket.
Kagiso Rabada produced an absolute jaffer to castle Moeen thirteen runs short of what would have been a deserved century.
Mark Wood lasted just two balls before he too fell to Rabada leg before wicket for a duck and it seemed the innings was nearly done but there was yet another twist.
James Anderson joined Broad and both threw their bats at everything.
Anderson's knock was largely streaky but included an audacious hook shot for six off Morkel with the number 11 giving the quick the charge.
Broad smashed two successive sixes off the self-same Morkel and would race to 57 off 47 balls, his first Test fifty since 2013, before Anderson nicked off ending the innings.
It was Morkel who bagged the final scalp to make him the pick of the South African bowlers with figures of 4/115.
The Proteas survived a nervy four overs before lunch taking the meal at 10/0.
However shortly after the break Broad had Heino Kuhn caught (1) in the slips.
Stand in skipper Dean Elgar and Hashim Amla (29) brought a period of stability adding 72 for the second wicket.
Amla was trapped leg before by Moeen Ali and England were beginning to get on top of the Proteas who made it to tea at 96/2.
Broad and Ali nipped out the pair of Elgar (54) and Duminy (15) shortly after the tea break to leave the Proteas reeling at 104/4.
Ali became the second fastest Englishman to take 100 wickets and score 2000 runs doing it in 38 Tests.
This brought together Theunis de Bruyn and Temba Bavuma and the pair looked rock solid adding 99 for the fifth wicket and looking like they would keep England at bay.
De Bruyn (48) walked after getting a faint edge to an Anderson delivery with the bowler barely appealing.
The nightwatchman Rabada (9*) and Bavuma (48*) saw South Africa to the close at 214/5 with a lot of work to do to get back into this game.