The New Zealand cricketers took three wickets in the final eight overs on day two to fight their way back into the second test against England in Leeds after the hosts had looked destined to post an imposing first innings total.
Resuming on 297 for 8 the Black Caps reached 350 all out in their first innings, adding another 53 runs in just 7.1 overs at the start of the second day.
Stuart Broad took the final two wickets to fall on his way to a return of 5-109 in 17.1 overs, an expensive run-rate of more than six an over.
Spinner Mark Craig was 41 not out for New Zealand having faced 63 balls including five fours and a six.
In reply, England appeared to be cruising on 215 for two before losing three wickets late in the day to finish on 253 for five at stumps, trailing the Black Caps by 97 runs.
England opener Adam Lyth upstaged his captain, Alastair Cook, by scoring his maiden test century at the top of the hosts innings.
However Cook did claim a major milestone, becoming England's highest-ever run-scorer in test cricket when he broke the record of batting mentor Graham Gooch.
Cook went past Gooch's record haul of 8900 test runs for England shortly after lunch and made 75 in an opening partnership of 177 with Lyth who hit 107 in his second appearance.
England came back from tea on 109 without loss but New Zealand fought back strongly in the final session, picking up five wickets to leave the match finely poised with England 97 runs behind.
England were looking good at 236 for two with less than 10 overs remaining in the day, but New Zealand took the new ball and struck immediately, taking three wickets in final eight overs to leave the test evenly poised heading into day three.
Cook and Lyth started cautiously compared with the touring side's flamboyant stroke-play that lit up Headingley on Thursday and England went to lunch on 54 for no wicket.
Left-hander Cook drove Tim Southee to the cover boundary to go past Gooch's record and immediately knuckled down in search of his 28th test century.
Lyth struck a few crisp boundaries through the off side and his 50 included seven fours.
Cook soon followed him to a half-century, carving his ninth four over the slips, and the pair looked completely in control on 163 for no wicket at tea.
Captain Cook was then trapped lbw by off-spinner Mark Craig, misjudging a straight delivery and being given out after a review.
His departure seemed to unsettle Lyth who played the ball on to his stumps without dislodging the bails on 90.
The compact left-hander spent 40 minutes in the nervous 90s before striking successive fours off Craig to reach his 100.
Lyth celebrated wildly in front of his home Yorkshire crowd, punching the air and acknowledging the warm applause.
Gary Ballance, who failed twice in the first test, took 18 balls to get off the mark but soon began to pepper the boundary with trademark square cuts.
Lyth, looking weary, was run out when his partner called him for an impossible single and Ballance, on 29, was bowled by Trent Boult with the second new ball.
Joe Root edged Southee to wicketkeeper Luke Ronchi for one and Ben Stokes, on six, then clipped Boult to Craig at slip in the penultimate over.
Ian Bell (12 not out) and Jos Buttler (six not out) will resume play in the morning.