Rookie left-hander Rachin Ravindra's unbeaten 91 gave New Zealand a slender chance for victory against Sri Lanka, with the tourists needing another 68 runs with two wickets in hand after day four of the first Test on Sunday.
Set a target of 275, New Zealand were 207-8 at stumps with spinner Ajaz Patel, on nought, to resume with Ravindra on Monday.
Ramesh Mendis and Prabath Jayasuriya picked up three wickets each on a sharply turning pitch in Galle, where the Black Caps have lost all four of their previous Test encounters.
Ravindra's knock was the highest score by a New Zealander at the ground, eclipsing Ross Taylor's 89 in 2019. The left-hander appeared solid on a spin-friendly wicket but lacked support from other batsmen, with Kane Williamson and Tom Blundell the next biggest scorers on 30 apiece.