Kane Williamson was hailed as "world class" after New Zealand's record Test run-scorer orchestrated a dramatic last-ball win over Sri Lanka on a rain-disrupted final day in Christchurch on Monday.
The thrilling triumph at the Hagley Oval scuppered Sri Lanka's chances of making the World Test Championship final, handing the spot to India.
In a helter-skelter finish, the only Sri Lankans not guarding the boundary for most of the closing 10 overs were the bowler and wicketkeeper as New Zealand chased down their target of 285.
Having lost eight wickets and on a day limited to 53 overs, skipper Tim Southee paid tribute to his star batsman Williamson.
The former captain finished 121 not out and ran a bye off the final delivery of the match in a remarkable conclusion, to go with New Zealand's one-run victory over England a fortnight ago.
"Seeing how calm he is out in the middle keeps us calm as well," Southee said as New Zealand celebrated another famous, nail-biting win.
"The guys were very trusting in what he was going to do and alongside Daryl (Mitchell) for most of the day it was a great partnership that got us in that great position.
"He's a world-class player and world-class players are able to perform in different conditions."
Visiting captain Dimuth Karunaratne said that fielding errors let his side down, particularly dropping the talisman Williamson on 33.
"We had a good chance to win, unfortunately we are the losing side," he said.
"We had misfields a few times that cost us the game. We have to minimise those mistakes."
When rain wiped out the first two sessions on the fifth day, the umpires ruled there would be a minimum of 53 overs played in the evening, which meant New Zealand would have to average 4.85 an over.
After a steady but slow start which saw the hosts at 90-3, Williamson and Mitchell picked up the pace.
They put on 142 in 26 overs for the fourth wicket with the precision of a one-day partnership as Sri Lanka paid a heavy price for Niroshan Dickwella dropping Williamson.
"If we had grabbed that catch it would have been a different story," said skipper Karunaratne.
The 31-year-old Mitchell, a late arrival on the international stage, contributed 81 to lift his average to a phenomenal 59.04 from 26 innings.
In a match of see-sawing fortunes, Sri Lanka had the upper hand on the opening two days before a first-innings century from Mitchell and a swashbuckling 72 from Matt Henry -- the last 60 from only 35 deliveries -- swung the game in New Zealand's favour.
Sri Lanka fought their way back into contention on the fourth day with a defiant 115 from Angelo Mathews, who built partnerships of 105 for the fifth wicket with Dinesh Chandimal and then 60 with Dhananjaya de Silva.
Final-day knife edge
When the Sri Lanka second innings folded at 302 it left New Zealand needing 285 to win on a ground where the highest fourth-innings score was 256-8 by New Zealand in a 2018 draw against England.
Devon Conway was removed for five, leaving the outcome on a knife edge going into the final day.
When play resumed on Monday, Prabath Jayasuriya made early in-roads with the wickets of Tom Latham for 25 and Henry Nicholls for 20.
Asitha Fernando bowled Mitchell and Tom Blundell (three) and had Michael Bracewell caught for 10 to leave New Zealand 266-6 and needing a further 19 runs with 16 balls left.
Williamson kept going to take the game to the final ball as Southee (one) and Matt Henry (four) came and went, with Neil Wagner not out nought.
For Sri Lanka, Fernando took 3-63 and Jayasuriya 2-92.
The second Test starts in Wellington on Friday.