A stylish maiden Test century from Quinton de Kock and two wickets from Kagiso Rabada put South Africa on top at stumps on day two of the fourth and final Test against England at Centurion.
De Kock was ruled out of the third Test defeat at the Wanderers last week after injuring himself walking his dog, but the wicketkeeper-batsman ensured the Proteas grasped a big lead on Saturday.
The left-hander was dropped twice and made the most of that fortune by playing some expansive strokes to make an entertaining 129 not out off only 128 balls which will surely see him given a longer run in the Test side.
De Kock and Dane Piedt (19) put on 82 for the ninth wicket to get South Africa up to 475 all out, with Ben Stokes taking 4-86, then paceman Rababa got rid of Alex Hales (15) and Nick Compton (19).
Captain Alastair Cook (67no) and Joe Root (31no) then took the tourists - who hold an unassailable 2-0 lead in the series - to 138-2 at the close and trailing by 337.
The Proteas resumed on 329-5 after Hashim Amla and Stephen Cook made centuries on day one and they looked set for a collapse a week after being skittled out for 83 when Temba Bavuma (35) and Rabada (0) were dismissed by Stuart Broad and James Anderson respectively.
Stokes put down a sharp chance to get rid of De Kock in the gully when he was on 28 and he set about making the most of that let-off wiith some elegant strokes as the England bowlers looked increasingly weary.
Kyle Abbott smashed Moeen Ali (2-104) for a big six before he was trapped in front by Stokes, but Piedt gave great support to De Kock in a frustrating stand for the tourists.
De Kock was put down again by Cook on 90 and had another life when the England skipper and Jonny Bairstow failed to react when the ball flashed between them.
He brought up his century after Stokes had Piedt caught behind and then bludgeoned 15 off an over from Moeen, but ran out of partners after hitting 17 fours and clearing the ropes twice.
Hales was in need of a big score, but the opener was trudging off once again when he struck Rabada tamely to Dane Piedt at point.
England were 78-2 when Compton was trapped leg before by a Rabada delivery that kept low, but Cook stood firm to move just 50 runs from the 10,000 landmark at Test level after he and Root ensured no further damage was done.