Tim Southee rescued New Zealand with the bat then dragged his side back into the match with the ball after Sri Lanka's Suranga Lakmal's career-best figures had threatened to dominate the first day of the second test in Christchurch on Wednesday.
Southee counter-attacked with wicketkeeper BJ Watling to blast 68 from 65 balls and take New Zealand from the depths of despair on 64 for six after Lakmal had destroyed the top order on a green wicket at Hagley Oval.
The 30-year-old Southee and Watling (46) combined for 108-runs as New Zealand were dismissed for 178 with Lakmal finishing with five for 54.
First test centurion Angelo Mathews was on 27 with Roshen Silva (15) as the visitors were 88 for four at stumps, with neither team holding the advantage as both seek to win the two-match series with victory in Christchurch.
The first test in Wellington ended last week in a damp draw after virtually all of the final day's play was washed out.
The 31-year-old Lakmal, utilising the overcast, cool conditions and green pitch, had reduced the hosts to 36 for four after Dinesh Chandimal had won the toss and wasted little time in choosing to field.
Lakmal went to lunch having bowled 12 successive overs with figures of four for 18.
Southee, whose innings of 77 not out in his debut in 2008 remains his highest score, then decided attack was the best form of defence and belted six fours and three sixes to resurrect his side's fortunes.
His dismissal, to a brilliant, one-handed leaping catch by Danushka Gunathilaka at short mid-wicket, sparked another collapse with the last three wickets adding just six runs.
Southee then took the first three Sri Lankan wickets to reduce them to 21 for three inside 10 overs.
The second victim -- Chandimal for six -- moved him to 234 test wickets and third on New Zealand's all-time list.
Chris Martin had been in third on 233, although Southee is still a long way away from Daniel Vettori's 361 and Richard Hadlee's New Zealand-leading mark of 431 wickets.
After his initial spell, Southee continued to be a threat towards the end of the day's play as Silva and Mathews played and missed several times but saw their side through to stumps.
New Zealand first innings
J. Raval c Chandimal b Lakmal 6
T. Latham c Mendis b Lakmal 10
K. Williamson c Dickwella b Lakma l2
R. Taylor run out (Kumara) 27
H. Nicholls b Lakmal 1
B. Watling c Perera b Kumara 46
C. de Grandhomme c Chameera b Kumara 1
T. Southee c Gunathilaka b Perera 68
N. Wagner c Mendis b Lakmal 0
Patel c Lakmal b Kumara 2
T. Boult not out 1
Extras: (b6, lb7, nb1) 14
Total: (all out, 50 overs) 178
Fall of wickets: 1-16 (Raval), 2-17 (Latham), 3-22 (Williamson), 4-36 (Nicholls), 5-57 (Taylor), 6-64 (de Grandhomme), 7-172 (Southee), 8-175 (Wagner), 9-177 (Watling), 10-178 (Patel)
Bowling: Lakmal 19-5-54-5, Kumara 14-4-49-3 (1nb), Mathews 4-1-6-0, Chameera 8-1-43-0, Perera 5-1-13-1
Sri Lanka first innings
D Gunathilaka c Raval b Southee 8
D Karunaratne c Williamson b Southee 7
D Chandimal c Walting b Southee 6
K Mendis c Watling b de Grandhomme 15
A Mathews not out 27
R Silva not out 15
Extras: (b5, lb5) 10
Total: (4 wickets, 32 overs) 88
Yet to bat: N Dickwella †, MDK Perera, RAS Lakmal, CBRLS Kumara, PVD Chameera
Fall of wickets: 1-10 (Karunaratne) 2-20 (Chandimal), 3-21 (Gunathilaka), 4-51(Mendis)
Bowling: Boult 10-5-20-0, Southee 11-3-29-3, de Grandhomme 6-0-19-1, Wagner 5-0-10-0