Christchurch - Neil Wagner captured the wicket of in-form Sri Lanka batsman Kusal Mendis to revive New Zealand's spirits as they fought to wrap up the series-deciding second Test in Christchurch on Saturday.
Sri Lanka were also hampered by an injury to Angelo Mathews who appeared to tweak a hamstring and could only hobble for the last 10 minutes before tea.
Wagner's vital strike ended a significant 117-run stand by Mendis and Dinesh Chandimal who had defied the New Zealand attack for 53 overs.
With Sri Lanka set an improbable 660-run target, they went to tea on day four at 155 for three, leaving them with seven wickets remaining to bat through the final four sessions.
Chandimal's no-risk approach saw him take 172 deliveries to reach his 17th half century and at tea he was on 56 with the injured Angelo Mathews on 22 while Mendis was out for 67.
Mendis, who in the course of his innings became only the second player behind India's Virat Kohli to score 1 000 runs this year, showed admirable patience to survive the morning session against the swing and seam of Trent Boult and Tim Southee.
But as the pitch flattened under a strong sun the 23-year-old came undone when faced with Wagner.
After sending down a barrage that forced Mendis onto the back foot, the New Zealand left-armer switched to a full-length delivery which the frustrated batsman could not resist.
His drive was expertly grasped by substitute fielder Matt Henry diving low to his left at extra cover.
New Zealand, pushing to win a fourth consecutive series for the first time, had earlier missed a genuine opportunity to remove Chandimal.
When the Sri Lankan skipper ran a risky single in the fourth over after lunch, Jeet Raval pounced on the ball at square leg but was astray with his throw at the stumps when a direct hit would have found Chandimal out of his crease.
Mathews looked in considerable discomfort after pulling up lame when completing a run.
He was attended to by the team physio but could only manage a shuffle between the wickets in the remaining three overs before the break.
After Sri Lanka resumed the day at 24 for two they put on 65 in the morning session and 66 for the loss of one wicket between lunch and tea.