The Black Caps have fought back against Sri Lanka's spinners to cut the deficit to a mere 48 at the end of the third day of the second and final cricket Test in Colombo.
Tom Latham led New Zealand's response with an unbeaten 111 against Sri Lanka's first-innings total of 244.
The touring side, trailing 1-0 in the series after Sri Lanka won the opener in Galle, reached 196 for four in their first innings, trailing the hosts by 48 runs on a pitch offering sharp turn for the spinners.
Latham and BJ Watling, who was not out on 25, were at the crease and have added 70 for the unbroken fifth wicket to boost New Zealand.
Captain and batting mainstay Kane Williamson fell cheaply again, guiding paceman Lahiru Kumara to slip to be out for 20 after scoring just four in two innings in Galle. Experienced batsman Ross Taylor made 23.
Off-spinner Dilruwan Perera dismissed Henry Nicholls for 15 to reduce New Zealand to 126-4 at one stage but Latham and Watling kept them at bay for the rest of the final session.
Latham, whose highest test score of 264 not out came against Sri Lanka last December, brought up his 10th test hundred with a boundary through midwicket off Perera.
After rain allowed just 66 overs of play on the first two days, Dhananjaya de Silva struck his fifth test hundred to help Sri Lanka post a respectable total.
Seamer Trent Boult, who had dropped an easy return catch from de Silva on Friday when he was on nine, dismissed the batsman for 109 to pick up his third wicket of the innings.
Boult's pace bowling colleague Tim Southee was the most successful bowler for New Zealand with figures of four for 63.
With that effort Southee became just the third New Zealander to get past 500 combined international wickets across the three formats.
He joined Daniel Vettori and Sir Richard Hadlee in that exclusive club.
Southee also sits one wicket away from joining teammate Trent Boult in the 250 Test wickets club.
Southee said he had been lucking to bowl in tandem with Boult over a number of years.