The Blackcaps have ended day three of the third test against England with a 137-run advantage, albeit with half their side dismissed at 168/5 in the second innings at Leeds.
Trailing by 31 runs, a 97-run stand between Tom Latham (76) and captain Kane Williamson (48) put the Blackcaps back in front - only for New Zealand to lose a flurry of wickets late on the third day.
Rain arrived to bring an early end to play, leaving the familiar pair of Daryl Mitchell (four not out) and Tom Blundell (five not out) to attempt to build the Blackcaps' lead and give their hosts a target to chase over the coming two days.
After England resumed their first innings at 264/6, behind by 65 runs, the hosts carried on in the hunt to bat the Blackcaps out of the contest.
The partnership of Jonny Bairstow and debutant Jamie Overton had reached 241 for the seventh wicket, a match-turning stand after England was 55/6 on day two.
Bairstow resumed on 130 and continued to pass 150 runs, taking just 144 balls with 92 of his runs coming in boundaries.
But with Overton three runs shy of a maiden test century, the tall right-hander perished and was caught by Mitchell for 97.
Bairstow added 55 runs in 45 balls with Stuart Broad (42 off 36) to take England ahead of New Zealand's first innings score of 329, and bring the hosts' total over 350.
And as the partnership threatened to get out of control for the Blackcaps, Tim Southee bowled Broad to keep the Blackcaps in contention.
Bairstow departed one ball later for 162 from 157 balls, as he holed out to Trent Boult at long-off to give Michael Bracewell his first wicket of the match - before Southee had Jack Leach lbw for eight to bowl England out for 360, 31 runs ahead.
In response, the Blackcaps' openers added 28 to eat into England's advantage - before Will Young was dismissed caught at third slip for eight off Matthew Potts.
Young's exit brought Williamson to the crease to join Latham, as New Zealand's senior pair added a half-century stand in 87 balls.
Latham reached his first 50 of the tour, taking 70 balls with six boundaries. The innings came at a vital time for Latham, who'd only scored 45 runs combined from his first four innings across the opening two tests and scored a duck in the first innings at Leeds.
At 125/1, Latham was out as Overton and Bairstow combined in the field this time - as the left-hander was caught behind the wicket for the second time in the match for 76.
Devon Conway came and went for 11, out to the part-time off-spin of Joe Root after bringing up New Zealand's 150.
In search of his first half-century of the tour, Williamson then went for 48 - caught by Bairstow off Potts - and when Henry Nicholls was caught and bowled by Leach for seven, the Blackcaps had slipped from 125/1 to 161/5, 130 runs ahead.
Hopes of a face-saving victory now rest on the pair of Mitchell and Blundell.
Excluding their current stand of an unbeaten seven runs, the duo has scored 611 runs at an average of over 122 when batting together this series and the Blackcaps will take anything close to that when day four begins on Sunday night if New Zealand is to avoid a series whitewash.
New Zealand 329 & 168/5 (Latham 76, Williamson 48; Potts 2/20)
England 360 (Bairstow 162, Overton 97; Boult 4/104)