Fifties from Martin Guptill and Kane Williamson helped New Zealand to a hard-fought three-wicket victory over Pakistan in a rain-affected final one-day international in Auckland on Sunday.
Guptill (82) and Williamson (84) shared a second-wicket stand of 159 to help the hosts reach their revised target of 263 with two balls to spare, after Pakistan had earlier made 290.
The win hands the hosts a 2-0 series victory and caps a miserable tour for Pakistan, who picked up just one victory in six limited-overs matches in New Zealand.
Sarfraz Ahmed's side recovered from a slow start at Eden Park to reach 215-3 at the 30-over mark, largely thanks to a 134-run third-wicket partnership between Babar Azam (83) and Mohammad Hafeez (76).
However, the visitors then lost three crucial wickets in eight overs to hand the momentum back to New Zealand's quicks, who went on to remove Pakistan's final seven wickets for just 75 runs - Adam Milne finishing with figures of 3-49.
Mohammad Amir, who was playing just his second ODI since returning from a five-year ban for spot-fixing, got Pakistan off to the perfect start in reply by removing Brendon McCullum for a first-ball duck in the second over.
Guptill and Williamson, who is now ranked as the second-best ODI batsman in the world, looked to be guiding the hosts to a comfortable victory before both fell cheaply to Azhar Ali (2-37), shortly before rain interrupted play.
Resuming on 210-5, New Zealand needed 53 of 45 balls to win the match and did so with two balls remaining thanks to cameos from Corey Anderson (35), Luke Ronchi (25) and Mitchell Santner (10).
Pakistan next face arch-rivals India in a T20 Asian Cup match on February 27, while New Zealand host Australia in the first of three one-day internationals, starting February 3.
Watch New Zealand v Australia live on Sky Sports 2 HD from 00.55am on Tuesday night.