New Zealand erased the first-innings deficit of 18 runs as they reached 18 for one at lunch on day three of the first Test against Sri Lanka in Galle on Friday.
The tourists lost opener Jeet Raval for four runs but captain Kane Williamson, who joined Tom Latham, was watchful and the Kiwis went to lunch without further damage.
Suranga Lakmal shared the new ball with off-spinner Akila Dananjaya, who was preferred over seamer Lahiru Kumara.
After a couple of tidy overs, Dananjaya was replaced by part-time off-spinner Dhananjaya de Silva, who dismissed Raval. The batsman was early on his shot and ended up lobbying the ball to skipper Dimuth Karunaratne at short extra cover.
Sri Lanka did well to get a slender first-innings lead after being 161 for seven. An eighth-wicket stand between Niroshan Dickwella and Suranga Lakmal proved to be crucial as the hosts got ahead of the Kiwis.
Dickwella posted his 12th Test half-century while Lakmal contributed with 40 runs as the pair added 81 runs for the eighth wicket. Lakmal had been given out caught at slip off William Somerville when he was on nine, but the decision was overturned on review.
The pair narrowly missed the Sri Lankan record for that wicket against New Zealand. Tilan Samaraweera and Upul Chandana had added 89 runs for the eighth wicket in 2005 in Wellington.
Ajaz Patel was the pick of the bowlers, finishing with a five wicket haul, his second in Test cricket. He also became the first New Zealander to claim a five-wicket haul in Galle. Somerville took three wickets while Trent Boult accounted for the other two dismissals.