On a scorcher at the Basin Reserve, Pakistan required something exceptional to beat New Zealand and they almost managed it, before the home side sealed their first 5-0 series win in 17 years.
Pakistan top order crumbled yet again after quick dismissal of three batsmen.
New Zealand won the toss and elected to bat as they seek a series whitewash in the fifth and final one-day worldwide against Pakistan in Wellington on Friday.
Not since 2000, when they beat Brian Lara's West Indies at home, have New Zealand swept a five-match series. "The bowling unit were very good".
In his first match since Boxing Day, Matt Henry was all over Pakistan's top-order at the Basin Reserve.
With Mohammad Hafeez (6) and Sarfraz Ahmed (3) also dismissed cheaply, Pakistan looked down and out before Haris Sohail (63) and Shadab Khan (54) put on a courageous fight with a 105-run stand for the sixth wicket.
Shubham Gill helps India top group with 10 wicket win vs Zimbabwe
It was totally one-sided affair as Australia registered a mammoth score of 370 runs in stipulated 50 overs. Desai and Gill then put on an unbeaten opening stand of 155 runs to power the Indians to an easy victory.
But Henry returned to remove Rumman Raees with the last ball of the 49th over to wrap up the game.
The Pakistanis were facing another comprehensive defeat after Martin Guptill's 13th ODI century and Matt Henry's fine performance with the ball, which left the visitors reeling at 57-5.
Guptill got off the mark spectacularly, a trademark straight drive off Aamer Yamin clearing the sightscreen, and Colin Munro (34 off 24) looked like he'd go large before trying one big shot too many. No.7 Shadab Khan (54) put on 105 with Haris Sohail to give Pakistan a chance, and they remained in the game until the penultimate over thanks to brisk runs from Fahim Ashraf (23), Aamer Yamin (32*) and Mohammad Nawaz (23). While Munro's departure slowed the run rate, Guptill was content to steadily accumulate.
Henry finished with figures of 4-53, having taken the opening three wickets - openers Umar Amin (2) and Fakhar Zaman (12) and Babar Azam (10), while Mitchell Santner (3-40), Lockie Ferguson (2-64) and Colin de Grandhomme (1-48) chipped in.
It gave his innings greater urgency and he brought up his century off 125 balls, including 10 fours and a six.
Guptill and Ross Taylor's 112-run third-wicket stand set up a potential grandstand finish, but Taylor's dismissal for 59 two balls into the 45th over triggered a late New Zealand collapse.