Trent Boult took two wickets in one over and broke a partnership that had threatened to take the game out of New Zealand's reach as Sri Lanka scored 264 for seven by the end of a rain-shortened first day of the second Test on Friday.
Captain Angelo Mathews was 63 not out when the players left the field at about 4:25 p.m. (0325 GMT) with Dushmantha Chameera yet to score.
In total, 23 overs were lost due to the rain.
The visitors, who were asked to bat on a green Seddon Park pitch in Hamilton, had been in control of the contest after tea with Mathews and Milinda Siriwardana starting to dominate the New Zealand bowlers.
Boult, who has struggled to rediscover his rhythm since returning from a back injury, however, bowled the best over of the innings, with the older ball swinging appreciably as dark rain clouds began to inch towards the ground.
He coaxed Siriwardana (62) into an edge that flew to first slip Ross Taylor, who having already dropped two earlier catches, bobbled the ball before holding on to it as he broke a 138-run partnership with Mathews.
Kithurawan Vithanage was then caught by a diving Brendon McCullum at mid-off for a duck three balls later after he got a leading edge to a swinging delivery.
Rangana Herath was then run out in Boult's next over from a direct hit by Kane Williamson as the visitors lost three wickets for just five runs.
Prior to that short period, Sri Lanka had looked to have seized control of the day with Mathews and Siriwardana untroubled at the crease and attacking left-arm spinner Mitchell Santner in particular.
The pair had been brought together at 121-4 after New Zealand had got back into the game when they broke a 71-run partnership between Dinesh Chandimal (47) and Udara Jayasundera, who was run out for 26 after some good fielding by Santner.
Chandimal, who scored half-centuries in both innings in the first Test in Dunedin, then chased an outswinger from Doug Bracewell that caught the edge and gave wicketkeeper BJ Watling his third catch of the innings.
His first two had been in the first session to Tim Southee, who managed to get rid of both Dimuth Karunaratne (12) and Kusal Mendis (31) to reduce the visitors to 44-2.
New Zealand won the first Test of the two-match series at University Oval by 122 runs.
Sri Lanka (1st innings):
D. Karunaratne c Watling b Southee 12
K. Mendis c Watling b Southee 31
U. Jayasundera run out (Santner, Watling) 26
D. Chandimal c Watling b Bracewell 47
A. Mathews not out 63
M. Siriwardana c Taylor b Boult 62
K. Vithanage c B. McCullum b Boult 0
R. Herath run out (Williamson) 4
D. Chameera not out 0
Extras: (lb-7 w-12) 19
Total: (for 7 wickets, 67 overs) 264
Fall of wickets: 1-39 D. Karunaratne, 2-44 K. Mendis, 3-115 U. Jayasundera, 4-121 D. Chandimal, 5-259 M. Siriwardana, 6-259 K. Vithanage, 7-264 R. Herath.
To bat: S. Lakmal, N. Pradeep
Bowling: T. Boult 17-2-43-2, T. Southee 16-5-51-2(w-1), D. Bracewell 19-2-79-1(w-1), N. Wagner 7-0-49-0(w-2), M. Santner 7-0-34-0, K. Williamson 1-0-1-0.