Temba Bavuma and Quinton de Kock both fell just short of centuries as the Proteas recovered to end day two of the second Test on top against New Zealand at the Basin Reserve on Friday.
The pair rescued South Africa from a position of strife on the second morning by adding 160 together for the seventh wicket, and along with the tail, ensured their team reach stumps on 349/9 - a lead of 81.
De Kock top-scored with a free-flowing 91 (118 balls, 10 fours, 3 sixes), while Bavuma recorded his highest score since his maiden century against England at Cape Town last year after making an invaluable 89 (160 balls, 9 fours).
There was also more than handy contributions by Vernon Philander (36) and No 11 Morne Morkel, who overcame being struck on the helmet by Tim Southee, to end on 31. Their unbroken final wicket stand was still going on 47 at end.
All this late order fight had come after the top order was shattered by the Black Caps' bowlers. They had reduced the tourists to a woeful 94/6 before lunch and were well on course to take control of the Test match.
Night-watchman Kagiso Rabada (9) was out within two overs of the start, before JP Duminy fell for a quick-fire 16.
Hashim Amla (21) continued his struggle to find his best form and Faf du Plessis (22) gave Colin de Grandhomme (3/52) a third wicket as the South Africans fell from 24/2 at the start to go into lunch six down and next to nothing on the scoreboard.
But the rest of the batsmen added 255 for the loss of three wickets as the lower-order and tail batted the Proteas into a position of dominance at stumps.