Spin bowler Ajaz Patel took five wickets to help New Zealand restrict Sri Lanka to 227/7 at stumps on the second day of the first Test on Thursday.
Sri Lanka trail New Zealand by 22 runs with three wickets remaining after the tourists were bowled out for 249 in the morning session.
Sri Lanka was well placed on 143/2 just before tea when Patel had Kusal Mendis caught by Ross Taylor at slip. Mendis' dismissal for 53 ended a 77-run partnership with Angelo Mathews (50) and opened the gates for four more wickets to fall within 40 minutes after tea.
Mendis hit seven boundaries and a six.
Kusal Perera (1) was confused by a rising ball from fast bowler Trent Boult and was caught at cover by Mitchell Santner, and Dhanajaya de Silva (5) stepped out to drive but gave a sharp return catch to Patel.
Angelo Mathews made 50 and edged a sharp turning delivery from Patel to Taylor at slip. He also hit seven boundaries and a six.
Sri Lanka slumped to 161/7, losing five wickets for 18 runs, before Niroshan Dickwella and No. 9 batsman Suranga Lakmal added an unbeaten 66-run partnership for the eighth wicket.
Dickwella is on 39 and Lakmal 28 not out.
Patel had bowling figures of 5/76, his second five-wicket haul only in his sixth Test.
Sri Lanka went to lunch at 34/1 with Mendis and captain Dimuth Karunaratne at the crease. Karunaratne (39) was out with the total on 66, trapped lbw by Patel, bringing Mendis and Mathews together.
Lahiru Thirimanne was out for 10, stumped by B.J. Watling off Patel.
Sri Lanka seamer Lakmal earlier ripped through New Zealand's middle and lower order with 4-29. New Zealand won the toss Wednesday and opted to bat first.
New Zealand resumed the day on 203/5 with Taylor looking solid on 86 and Mitchell Santner on eight before collapsing.
Play started 15 minutes early because only 34 deliveries were possible in the third session on the opening day because of rain.
Taylor was out in the first delivery he faced for the day, slashing at a ball leaving him from Lakmal's bowling and giving a catch to wicketkeeper Dickwella.
Taylor's 132-ball innings included six boundaries. It was his 31st half-century in Test cricket.
With 11 runs added to the score, Santner (13) left a ball from Lakmal pitching outside off stump, which came back to trap him lbw.
Spin bowler Akila Dananjaya returned Sri Lanka's best bowling figures of 5-80.
(With AP Inputs)