New Zealand's bowlers produced a late final session surge to guide their side to a tense 101-run victory over Pakistan in the first Test in Mount Maunganui on Wednesday and keep alive their hopes of reaching next year's World Test Championship final.
Pakistan were dismissed for 271, chasing a victory target of 372, with 4.3 overs remaining in the Test at Bay Oval.
"It was a brilliant game," New Zealand captain Kane Williamson said. "Both teams put their best foot forward and Pakistan were incredibly resilient in that second innings, but the boys kept coming."
"A huge effort by the bowlers to get us across the line."
New Zealand had been hot favourites to win the game as the final day started with the tourists 71-3 but a 165-run partnership between Fawad Alam and Mohammad Rizwan gave the tourists a chance of a draw, if not an unlikely victory.
Kyle Jamieson ended the partnership when he had Rizwan trapped in front, albeit after a review, for 60, and left Pakistan 242-6, still 131 runs away from their target with 25 overs remaining.
He also had Yasir Shah caught in the gully for a duck, while Neil Wagner, who has played the last three days with two broken toes, had Fawad caught by wicketkeeper BJ Watling for 102 and then Faheem Ashraf for 19 to expose the tail.
Mitchell Santner then trapped Mohammad Abbas in front for one, before last pair Shaheen Afridi and Nassem Shah stoically resisted for almost eight overs.
Nassem, however, got too far in front of a delivery from Santner and the left-arm spinner leapt high to take the caught and bowled dismissal and then raucously celebrate the win.
"Not a huge disappointment (with the result)," Rizwan said. "That's test cricket."
"We lost this match, but we're still in the series."
The second match in the two-Test series is at Christchurch's Hagley Oval from Jan. 3 and New Zealand need to win that game as well to give them any chances of making the Test Championship final at Lord's.