Rookie New Zealand pace bowler William O’Rourke struck early to send back Sri Lanka opener Pathum Nissanka as the hosts returned to bat on day three of the opening Test on Friday.
Sri Lanka were 32-1 at lunch in Galle to trail the Black Caps by three, with Dimuth Karunaratne on 23 and Dinesh Chandimal on two.
O’Rourke, 23, kept making waves for New Zealand after his second five-wicket haul from just three Test appearances during the first innings.
He dismissed in-form opener Nissanka in his second over when the batsman edged a bouncer to a diving Tim Southee at second slip.
New Zealand were all out for 340 after resuming on 255-4, losing their remaining wickets quickly despite a fightback from wicketkeeper Glenn Phillips, who made 49 off 50 balls.
This marked the first time the Kiwis had managed to post a score above 300 in Galle, where they have lost all four of their previous Test encounters.
Sri Lanka drew first blood in the morning when Tom Blundell was given out caught after a review, ending a solid 73-run partnership for the fifth wicket with Daryl Mitchell.
Mitchell went on to post the third half-century of the innings for New Zealand after staring down the spinners.
He was eventually run out on 57 when he responded to a risky call by Phillips, who miscalculated a single following a soft push to the covers.
The second new ball turned the tables for Sri Lanka, with Ramesh Mendis and Prabath Jayasuriya able to find bounce.
Jayasuriya took four wickets — including that of top-scoring opener Tom Latham for 70 on day one — while Ramesh bagged three.