BJ Watling scored his fifth Test century as New Zealand dominated the final session with steely resolve to put themselves in a strong position at stumps on day three of the second Test against England in Leeds.
The Black Caps will resume on 338 for six in their second innings when day four begins, with a lead of 338 runs.
Watling and captain Brendon McCullum added 121 runs against a toothless England attack to help New Zealand take the upper hand with two days of a fluctuating match left, and leave the tourists well placed to level the two-Test series at 1-1.
England had resumed in the morning on 253 for five in overcast conditions at Headingley and New Zealand fast bowler Tim Southee claimed three early wickets to reduce the hosts to 267 for eight.
Ian Bell, on 12, edged a wide ball to Mark Craig at second slip, Jos Buttler nicked a full delivery to Ross Taylor at first slip to depart for 10 and Moeen Ali made one before being smartly taken at third slip by Martin Guptill.
New Zealand were eyeing a healthy first-innings lead but Stuart Broad and Mark Wood had other ideas and the pair added 51 for the ninth wicket from 49 balls.
Off-spinner Craig had Wood caught by wicketkeeper Luke Ronchi for 19 but Broad put on 32 for the last wicket with James Anderson before being bowled for 46.
England were all out for 350, only the eighth time in test history that both teams made the same total in their first innings.
Broad continued to shine after lunch with the ball.
Tom Latham edged him to wicketkeeper Buttler for three and Kane Williamson fell in identical fashion for six to leave New Zealand tottering on 23 for two.
But Guptill and Taylor, dropped on six by Gary Ballance at slip, raced to a fifty partnership off 28 balls.
Guptill lifted Moeen straight for six to reach his half-century but the stand was broken at 99, Taylor driving Wood to Ben Stokes at cover to fall for 48.
Guptill's fine knock ended on 70 when he edged Wood to Joe Root at third slip but McCullum and Watling showed fierce determination in a patient fifth-wicket partnership.
McCullum went past 6,000 test runs, becoming just the second New Zealander after Stephen Fleming to achieve the feat, before Wood trapped him lbw for 55.
Ronchi, after making a rapid 31, was caught by Buttler off Anderson but Watling completed a deserved century, his fifth Test ton including a six and 13 fours.
Watling's century is also the first by a New Zealander at Headingley.
He will resume on 100 not out with Craig on 15 and New Zealand will attempt to bat England out of the game.
England won the first Test at Lord's by 124 runs.