Sarel Erwee guided South Africa to within sight of a first-innings lead in the first Test against England at Lord's on Thursday.
Erwee's 60 not out was the cornerstone of the Proteas' 158-2 at tea on the second day, a deficit of just seven runs after England had been bundled out for a mere 165.
Aiden Markram was in fine touch, his 16 not out featuring three elegant fours off Matthew Potts, James Anderson and spinner Jack Leach.
South Africa fast bowler Kagiso Rabada did the bulk of the damage in England's innings, returning figures of 5-52 -- the 12th time he has taken five wickets in a Test innings.
Ollie Pope's 73 was the only double-figure score by a specialist England batsman, with the next-best contribution coming from captain and all-rounder Ben Stokes, who made 20.
South Africa captain Dean Elgar and fellow opener Erwee both scored briskly, without taking undue risks, against an England attack that lacked both the pace and accuracy of their opponents' four quicks.
Elgar, however, was dropped on seven when he edged Potts, only for Zak Crawley to spill a head-high slip catch.
Elgar, punishing anything loose, was largely untroubled from then on until, having made 47, he fell in freak fashion when a ball from 40-year-old Anderson deflected off his thigh guard and forearm before trickling onto the stumps. His exit left South Africa 85-1.
New batsman Keegan Petersen got off the mark by stylishly whipping Anderson legside for a well-struck boundary.
The 32-year-old Erwee reached just his second fifty in his short Test career when he struck Stuart Broad through the covers for a sixth four in 89 balls faced.
But he nearly ran himself out soon afterwards when, going for a quick legside single, he was well short of his ground only for Broad to miss with a shy at the non-striker's stumps.
England did have a second wicket when Potts had Petersen (24) edging to Jonny Bairstow at third slip.
England resumed Thursday on 116-6, with Pope 61 not out and Broad unbeaten on nought, only to be all before lunch.
Rabada polished off the tail after he had sparked a collapse on Wednesday's rain-shortened first day by removing openers Alex Lees and Crawley.
England have won all four of their Tests under their new leadership pairing of Stokes and coach Brendon McCullum after switching to a mode of all-out attack.
But the policy did not work against a quality attack that has helped South Africa climb to the top of the World Test Championship table.
Pope should have been out for 67 when he edged Rabada straight to first slip, only for Erwee to floor a routine chance despite four juggled attempts to keep hold of the ball.
Rabada then got the wicket he deserved when Pope chopped on to a full-length ball for 73 to end a 102-ball innings, leaving England 134-7.
And he showed there was more to his game than sheer speed when he undid Broad (15) with a clever slower ball that the tailender lobbed to Elgar at point.
Rabada ended the innings when he had Anderson lbw for a duck to earn a place on the coveted honours board at Lord's.