A rollicking maiden century by Sri Lanka's Thisara Perera was ultimately in vain as New Zealand wrapped up the one-day series with a 21-run victory in the second ODI at Mount Maunganui.
With Sri Lanka chasing New Zealand's 319 for seven, they were on the ropes at 128 for seven when Perera opened up.
He faced 74 deliveries and cracked 13 sixes and eight fours before he was the last wicket to fall and Sri Lanka were out for 298 with 22 balls remaining.
Sri Lanka reached 112 for two when Ish Sodhi captured the wicket of Kusal Mendis for 20 to trigger a collapse which saw five wickets fall in six overs.
But Perera refused to give up as he bludgeoned the New Zealand attack with brute force.
He made 58 in a 75-run stand with Lasith Malinga for the eighth wicket, and scored 45 of the 51 runs for the ninth wicket with Lakshan Sandakan.
But when an seemingly impossible victory seemed on the cards Matt Henry had Perera caught by Trent Boult at long-on.
Opener Danushka Gunathilaka played his part at the top of the order with 71 but elsewhere the Sri Lankan batsmen failed to fire.
It continued a dismal tour for Sri Lanka who also lost the Test series 1-0 and lost the first ODI by 45 runs.
When New Zealand won the toss and elected to bat, Sri Lanka had their tails up when they removed first-match centurion Martin Guptill and Kane Williamson cheaply to have New Zealand at 39 for two.
But Ross Taylor (90)and Colin Munro (87) swung momentum New Zealand's way with a 112-run stand for the third wicket, while all-rounder James Neesham lit up the tail with a whirlwind 64.
Lasith Malinga was the pick of Sri Lankan bowlers with two for 45 while bowling for New Zealand Sodhi took three for 55.
The final match in the series is in Nelson next Tuesday and the tour closes with a Twenty 20 match in Auckland on Friday.
Thisara Perera on his performance:
Very proud of myself, because it's my first century. I've been batting at No. 8 or 9, so thanks for the batting coaches for trusting me at No.7.
With the last few batsmen, it's really hard to hit in this ground because of the wind, so I had to take the responsibility. I told Nuwan and Sandakan to at least play 6 balls, I'll take it from the other end.
I have to thank Chandika Hathurusingha and Thilan Samaraweera, they kept throwing, throwing, throwing [balls]. This is for these two.
I have hit five sixes before in my career. It's hard to get six sixes in a row. I was trying to get victory for my country, so I couldn't think of five sixes or four sixes.
M. Guptill c Dickwella b Malinga 13
C. Munro run out (K.Perera/Sandakan) 87
K. Williamson c Sandakan b Pradeep 1
R. Taylor run out (Sandakan/Dickwella) 90
H. Nicholls c Dickwella b Malinga 32
J. Neesham run out (Pradeep) 64
T. Seifert run out (T.Perera) 22
T. Southee not out 1
Extras: (b 4, lb 2, wd 3) 9
Total: (for 7 wickets; 50 overs) 319
Fall of wickets: 1-34 (Guptill), 2-39 (Williamson), 3-151 (Munro), 4-208 (Nicholls), 5-262 (Taylor), 6-302 (Neesham), 7-319 (Siefert)
Bowling: Malinga 10-0-45-2, Pradeep 9-0-59-1, Gunathilaka 1-0-10-0, T. Perera 7-0-69-0 (2w), Sandakan 10-0-56-0 (1w), Prasanna 5-0-34-0, Gunaratne 8-0-40-0
N. Dickwella b Southee 9
D. Gunathilaka c Seifert b Neesham 71
K. Perera c Boult b Henry 4
K. Mendis c Seifert b Sodhi 20
D. Chandimal b Sodhi 3
D. Gunaratne run out (Neesham/Siefert)6
T. Perera c Boult b Henry 140
S. Prasanna b Sodhi 0
L. Malinga b Boult 17
L. Sandakan c Taylor b Neesham 6
N. Pradeep not out 3
Extras: (lb 6, wd 13) 19
Total: (all out; 46.2 overs) 298
Fall of wickets: 1-28 (Dickwella), 2-63 (K. Perera), 3-112 (Mendis), 4-116 (Gunathilaka), 5-121 (Chandimal), 6-128 (Gunaratne), 7-128 (Prasanna), 8-203 (Malinga), 9-254 (Sandakan), 10-298 (T. Perera)
Bowling: Boult 10-1-61-1 (3w), Southee 8-0-68-1 (4w), Henry 9.2-1-52-2 (2w), Williamson 2-0-8-0, Sodhi 10-1-55-3 (2w), Neesham 7-0-48-2 (2w)