A maiden 50 for Colin de Grandhomme on the back of Kane Williamson's massive century secured a 175-run first innings lead for New Zealand on day four of the third Test in Hamilton on Tuesday.
De Grandhomme was the last wicket to fall, just on tea, in a Test New Zealand need to win to square the series.
After resuming the day seven runs ahead, New Zealand consolidated their lead with 76 runs in the morning session before de Grandhomme picked up the pace to put New Zealand in a strong position.
His 57 came off 70 deliveries and included five fours and two sixes.
As New Zealand advanced from their overnight 321 for four, they finally lost figurehead Williamson for 176 and his overnight partner Mitchell Santner went for 41 before lunch after the pair added 88 for the fifth wicket.
With South Africa on the back foot, de Grandhomme and BJ Watling chased the runs after lunch, adding 46 in 13 overs.
But Watling played on to Keshav Maharaj and was gone for 24.
Matt Henry added 12 and Jeetan Patel five before the innings folded with de Grandhomme gloving a Morne Morkel flyer through to wicketkeeper Quinton de Kock.
It was de Kock's fifth catch of the innings and third off the bowling of Morkel.
Williamson, the mainstay of the New Zealand innings, posted the third highest score of his storied career before he hooked Morkel to Vernon Philander who took the catch low down at long leg.
He faced 285 deliveries in a marathon innings which lasted more than seven hours and included 16 fours and three sixes.
In the last over before lunch, Santner nicked Kagiso Rabada to JP Duminy at gully to be gone for 41.
Ahead of taking the third new ball, South African skipper Faf du Plessis looked to buy a wicket by calling on Temba Bavuma. He had only bowled twice before which included the wicket of Josh Hazlewood in Australia four months ago.
But his two overs in Hamilton cost seven runs for no return, leaving Rabada and Morkel to take the new ball and remove the last two wickets.
Morkel finished with four for 100 and Rabada took four for 122.
Follow Emirates 24|7 on Google News.