Quinton de Kock fell five runs short of his century after dragging South Africa out of early trouble to reach 277 for nine at stumps on day one of the first test against Englandn in Centurion.
England took a wicket with the opening delivery of the four-test series and had their hosts teetering on 111-5 after lunch but De Kock's belligerent innings brought South Africa back into the match.
James Anderson marked his 150th cap and return to the England attack with the first-ball wicket of opener Dean Elgar, setting the tourists up for early domination of an inexperienced home side seeking to halt a run of five successive test defeats.
Sam Curran's skilful bowling earned him figures of 4-57 and Stuart Broad returned from illness to claim 3-52.
But De Kock wrestled the initiative away from England with an innings that combined early aggression, as he sought to impose himself on the bowlers, with later circumspection.
He reached his 50 off 45 balls with some ferocious hitting before digging in to try to tire out the England bowlers on a hot day.
He fell agonisingly short of a sixth test century as he feathered an away swinger from Curran through to wicketkeeper Jos Buttler for 95 off 128 balls.
De Kock featured in an 87-run sixth-wicket stand with 30-year-old debutant Dwaine Pretorius, who made 33, and 47 runs for the seventh wicket with Vernon Philander who was 28 not out at the close.
Curran led the way for the England bowlers, who had to do without Ben Stokes, forced off the field with dehydration although he did return to field for the last hour.
The 37-year-old Anderson's first ball in test cricket for five months, having limped out of the Ashes series with a calf injury, was a warm-up delivery down the leg side that Elgar tried to flick at and edged to Buttler.
It was not the start South Africa, under a new coaching regime after an administrative crisis, were looking for against an England side who have battled with a G��flu bug in their camp since arriving almost two weeks ago.
But Zubayr Hamza, in his third test, boosted his chances of securing the regular No. 3 place with 39 before being caught in the slips by Stokes off Broad.