HAMILTON, New Zealand (AP) " Kane Williamson's superb 176 almost exactly measured New Zealand's first-innings advantage over South Africa in the third cricket test Tuesday before a top order collapse left the Proteas' second innings in disarray at stumps on day four.
Under Williamson's guidance New Zealand achieved a 175-run first-innings lead, reaching 489 in reply to South Africa's 314.
At stumps the tourists were 80-5 after a sometimes chaotic start to their second innings, still 95 behind.
The Proteas stumbled to 59-5, losing Dean Elgar (5), Theunis de Bruyn (12), Hashim Amla (19), J.P. Duminy (13) and Temba Bavuma (1), before captain Faf du Plessis and Quinton de Kock, both 15 not out, steered them to stumps.
South Africa came into the test at Seddon Park with a 1-0 lead in the three test series, which seemed formidable at a ground where defending a series lead was likely to be easier than overturning it.
The Proteas' 314 from almost 90 overs in a match which suffered rain delays on the first three days seemed a further bulwark against any New Zealand effort to retrieve the series. But the Black Caps were able to fashion a significant first- innings lead then push to salvage a drawn series with a superb bowling and fielding effort in Tuesday's final session.
They will enter the last day in a position to claim a win but the threat of rain still hovers over the match and it may be weather that has the final say.
The self-inflicted damage that overtook South Africa's second innings was unexpected. The Proteas seemed to have all the batting resources they needed to negotiate the final session with little loss and to turn pressure back onto New Zealand on the final day.
But opener Elgar was out in the sixth over, caught by wicketkeeper B.J. Watling from the bowling of makeshift new ball bowler Colin de Grandhomme and that precipitated a cascade of wickets.
De Grandhomme had a major influence on the day, scoring his maiden test half-century at No. 8 to inflate New Zealand's total after Williamson's dismissal. He then claimed a catch to dismiss Elgar and added the wicket of Amla.
Chaos entered the South African innings in the manner of de Bruyn's dismissal in his maiden test. After being out for a duck in the first innings, he had batted 46 minutes for 12 when run out in a slapstick mix-up with Amla.
Amla drove the ball down the on-side of the pitch; de Bruyn turned to watch the ball go past him without realizing Amla was bearing down on him at great speed. When he finally set off for the run, their collision was inevitable and both were left sprawling on the pitch.
After Amla was caught by de Grandhomme off Jeetan Patel, Duminy showed his weakness against off spin and was bowled by Patel, leaving a ball which came on with the arm. Patel had 2-22 at stumps.
The 30-run partnership between du Plessis and de Kock had lasted 46 minutes by stumps and was South Africa's best hope, other than the weather, of saving the match.
"I think all-round it was a pretty good day," said New Zealand allrounder Mitchell Santner, who made his own contribution with 41 in a 88-run partnership with Williamson which took New Zealand past South Africa's total.
"We managed to eke out a bit of a lead with some good batting, especially by Kane and Colin. I think the seamers came out and put the ball in good areas and I think that's what we did well. We put them under pressure and managed to get five wickets."
In taking his overnight score from 148 to 176, Williamson posted the highest score by a New Zealand batsman in a home test against South Africa. He previously surpassed 5,000 test runs and matched Martin Crowe's record of 17 test centuries for New Zealand.
This story has been automatically published from the Associated Press wire which uses US spellings