Kane Williamson fought hard to establish his innings before cashing in during the final session to lead New Zealand to 177 for three at close of play on the second day of the first test against South Africa on Thursday.
The New Zealand skipper was subjected to immense pressure from pacemen Kagiso Rabada, Vernon Philander and Morne Morkel but reached 78 not out at stumps with nightwatchman Jeetan Patel alongside him on nine at University Oval in Dunedin.
New Zealand could have been even better placed had Ross Taylor not retired hurt with a calf injury while on eight and the hosts 148 for two.
South Africa had been bowled out for 308 shortly after lunch when Trent Boult (4-64) dismissed Philander for 21 to pick up his fourth wicket of the innings.
Philander got an early breakthrough when Tom Latham was caught behind by Quinton de Kock for 10 as the pace trio embarked on a war of attrition with Williamson and opener Jeet Raval.
The 31-year-old Philander and Williamson engaged in a fascinating battle, with the bowler hammering away on a good length at off stump.
Williamson, however, managed to see off Philander's initial spell and when left-arm spinner Keshav Maharaj was introduced, the New Zealand pair began to free up, despite having to deal with the extra bounce from Morkel.
The reached 59 for one at tea then capitalised in the final session, Raval reaching his third test half century with a punch down the ground off Maharaj for his sixth boundary.
Williamson brought up his 26th test half century with three successive boundaries from Rabada, which also brought up the century-partnership with Raval.
Opener Raval was dismissed for 52 in the next over as he looked to work away a delivery from Maharaj only to pick out Dean Elgar at short midwicket instead.
Henry Nicholls was the other wicket to fall, brilliantly caught by Hashim Amla at slip off Maharaj for 12.
New Zealand had earlier taken the last six South African wickets for 79 runs in a little over two hours, with four falling in the first session, including Elgar for 140 and Temba Bavuma for 64 after they had compiled a 104-run partnership.
Scoreboard (Day 2)
South Africa 1st innings:
S Cook lbw Boult 3
D Elgar c Watling by Wagner 140
H Amla b Wagner 1
J Duminy c Taylor b Wagner 1
F du Plessis c Boult b Neesham 52
T Bavuma c Watling b Boult 64
Q de Kock c Wagner b Patel 10
V Philander b Boult 21
K Maharaj c Neesham b Boult 5
K Rabada b Patel 4
M Morkel not out 0
Extras: (B-4, LB-1, W-2) 7
Total: (all out in 122.4 overs) 308
Fall of wickets: 1-10, 2-20, 3-22, 4-148, 5-252, 6-265, 7-279, 8-298, 9-308, 10-308
Bowling: Boult 32.4-12-64-4, Wagner 31-8-88-3, Patel 33-12-85-2, Santner 18-5-32-0, Neesham 8-2-34-1
New Zealand 1st innings:
T Latham c de Kock b Philander 10
J Raval c Elgar b Maharaj 52
K Williamson not out 78
R Taylor rtd hurt 8
H Nicholls c Amla b Maharaj 12
J Patel not out 9
Extras: (LB-6, NB-2) 8
Total: (for 3 wickets in 55 overs) 177
Fall of wickets: 1-15, 2-117, 3-165
Bowling: Rabada 14-3-46-0, Philander 14-4-37-1, Morkel 10-3-26-0, Maharaj 16-3-57-2, Duminy 1-0-5-0.
IMAGE: New Zealand’s Kane Williamson
Photograph: Phil Walter/Getty Images