The Blackcaps have finished their tour of Pakistan on a high, closing out a comprehensive 47-run win in the fifth and final one-day international against Pakistan on Monday (NZ time).
After winning the toss, the New Zealanders seemed destined for an imposing score courtesy of some significant early partnerships anchored by opener Will Young (87 off 91 balls).
But a flurry of late wickets by Shadab Khan and Usama Mir ensured a stumbling finish for the Blackcaps, who limped through to 299 all out in the final over.
But Pakistan's chase never genuinely threatened, with Henry Shipley taking 3/34 to see them dismissed for 252 in the 46th over to claim a consolation win amid a 4-1 series defeat.
The result means the Blackcaps avoid a series whitewash and will leave the tour somewhat heartened considering the absence of several key players due to the IPL.
After losing Tom Blundell (15) early, Young combined with Henry Nicholls (23) - who was promoted due to Daryl Mitchell being rested - to put on a second-wicket stand of 51 runs, before Nicholls was dismisssed in bizarre fashion - chopping a ball off his foot into the wicketkeeper Mohammad Rizwan's gloves.
That brought Latham to the crease, linking with Young to put on 74 runs - New Zealand's best partnership of the day.
Young's innings came to an end in the 30th over, with the Blackcaps well poised at 3/157.
Mark Chapman strode out and continued his rich vein of form in Pakistan, slashing 43 off 33 balls before tickling a catch fine to Rizwan to end a 56-run stand with his captain Latham, with the NZ score at 4/213 in the 37th over.
Latham finished with a typically efficient 59 off 58, before holing out to deep mid wicket in the 42nd over.
Both Cole McConchie (26 off 28) and Rachin Ravindra (28 off 20) made handy contributions down the stretch but regular wickets meant they weren't able to surpass the 300-run mark.
Shipley took the key early wickets of dangermen Babar Azam and Rizwan, with Ravindra (3/65) snaring red-hot Fakhar Zaman to put the hosts well on the back foot at 66/4 in the 19th over.
Iftikhar Ahmed did his best to help stage an unlikely comeback but run out of batting partners, eventually carrying his bat with 94 off just 72 balls.
New Zealand 299 (Young 87, Latham 59; Shaeen Shah Afridi 3-46) beat Pakistan 252 (Iftikhar 94, Salman 57; Shipley 3/34, Ravindra 3/65) by 47 runs.