HAMILTON - A masterful Kane Williamson century propelled New Zealand ahead of South Africa at stumps on day three of the series-deciding final Test in Hamilton on Monday.
It was the 17th ton by Williamson, equalling Martin Crowe's New Zealand record, and featured in a commanding 190-run stand with Jeet Raval for the second wicket.
Raval's dismissal late in the day for 88 triggered a revival for South Africa as New Zealand slipped from 273 for one to 321 for four at stumps in reply to South Africa's 314.
Williamson was unbeaten on 148 with Mitchell Santner on 13.
New Zealand, battling to square the series which South Africa lead 1-0, took control on the third day after rain delayed the start.
Raval resumed with Tom Latham who progressed from his overnight 42 to 50 before he was caught behind by a diving Quinton de Kock off Morne Morkel.
It was to be another 58 overs before a second wicket would fall as Williamson joined Raval to dictate the terms to a bowling attack toiling on a flat track.
South African skipper Faf du Plessis had identified Williamson's wicket as a key to beating New Zealand, and the number three batsman showed why as he moved quickly into attack mode, mindful of time lost because of the weather.
Williamson worked the ball to all parts of the ground including a six off Keshav Maharaj over the bowler's head.
He followed up with two more off Vernon Philander and Morne Morkel over the square leg boundary – three sixes in one innings from a batsman who only had nine from his previous 60 Tests.
The six off Philander made him the sixth and fastest New Zealander to reach 5,000 Test runs, seven innings quicker than the previous record set by Crowe.
When Williamson smacked part-timer Dean Elgar to the boundary for his hundred, he equalled Crowe's New Zealand record of 17 centuries but took 16 fewer Tests to get there.
While Williamson punished the bowling, Raval was impressively patient as he picked up ones and twos off the pace attack of Philander, Morkel and Kagiso Rabada.
He batted for 390 minutes and faced 254 balls for his 88 before falling to the Morkel-de Kock combination.
Unlike Latham, whose edge had the wicketkeeper diving to his left to take a one-handed catch, the left-hander Raval had an inside edge which forced de Kock to dive right to take another one-handed catch down the leg side.
Rabada then accounted for Neil Broom (12) and Henry Nicholls (nought) in successive balls before Santner joined Williamson to guide New Zealand through to stumps.
For South Africa, Morkel has two for 74 and Rabada two for 83.