A maiden Test century by Henry Nicholls hauled New Zealand off the ropes and back into the second Test against South Africa on day one in Wellington on Thursday.
From reeling at 21 for three inside the first hour, New Zealand were all out for 268 in the final session of the day with the left-handed Nicholls providing the backbone of the innings with 118.
His eventual dismissal triggered a brief collapse in which three wickets fell for five before Tim Southee and Jeetan Patel lashed out with a whirlwind 44 off as many balls.
Nicholls, who went into the Test with an average of 30.12 from 18 innings and his position under scrutiny as a number five batsman, answered his critics with an innings of confident drives and cuts against the quicks and sure footwork against spin.
In one notable over from Kagiso Rabada, a central figure in the top order collapse, Nicholls smacked three fours.
The second took him past his previous best of 98 and to his breakthrough century, and the next four took his partnership with BJ Watling to 103 to better one of the longest standing New Zealand cricket records.
The previous best sixth-wicket stand by New Zealand against South Africa of 100 was set 85 years ago by Ted Badcock and Giff Vivian.
When South African captain Faf du Plessis won the toss he put New Zealand into bat noting conditions were ripe for seam and swing and he was not let down.
After Morne Morkel dismissed Tom Latham for eight, Rabada captured the key wicket of Kane Williamson for two and four balls later he had debutant Neil Broom for a duck which took Nicholls to the middle.
Keshav Maharaj removed Jeet Ravel (36) and Jimmy Neesham (15) either side of the lunch break before Watling joined Nicholls to add 116 before New Zealand's batting anchor was bowled by JP Duminy.
Duminy added the wickets of Colin de Grandhomme for four and Watling for 34 in the space of 11 balls and finished the innings when he had Neil Wagner leg before wicket for two to have figures of four for 47.
Morkel ended Southee's brief cameo of 27 off 30 deliveries while Patel was left not out 17.