Image courtesy of: ESPNcricinfo
Sri Lanka captain Dimuth Karunaratne and Lahiru Thirimanne scored an unbeaten 71 and 57 not out respectively to put their side 135 runs away from victory heading into the final day in Galle.
Starting off the day on 195/7, New Zealand added 29 runs to their overnight score before BJ Watling was caught behind off the bowling of Lahiru Kumara for 77, which came off 173 balls and included six boundaries.
Trent Boult smashed a quickfire 26 before he was dismissed by Kumara.
New Zealand ended up being bowled out for 285, which set Sri Lanka a target of 268 to win, when Ajaz Patel was sent packing by Dhananjaya de Silva for 14.
William Somerville was left stranded on 40, which came off 118 deliveries and included two boundaries.
Lasith Embuldeniya was the pick of the bowlers with four wickets, while De Silva snapped up three, Kumara took two and Akila Dananjaya claimed one.
Chasing 268 to win, Sri Lanka got off to a sensational start as Karunaratne and Thirimanne amassed an unbeaten 133-run partnership, during which both batsmen brought up their half-centuries, before bad light brought play to an end for the day.
Karunaratne finished on 71, which came off 168 balls and included two boundaries, while Thirimanne remained undefeated on 57, which came off 132 deliveries and included four boundaries.
Sri Lanka ended day four on 133/0 and will continue batting on Sunday at 10:00 local time or 04:30 GMT.