Henry Shipley and Rachin Ravindra shared six wickets as New Zealand beat Pakistan by 47 runs in the fifth and final one-day international in Karachi on Sunday.
The victory meant New Zealand avoided being swept in the five game series, which Pakistan won 4-1.
Fast bowler Shipley then took 3-34 and spinner Ravindra a career best 3-65 as New Zealand survived a brilliant 72-ball 94 not out by Iftikhar Ahmed to dismiss Pakistan for 252 in 46.1 overs.
The defeat means Pakistan's rise to number one in the ODI rankings lasted just 48 hours and they are now third behind Australia and India.
"It's is certainly pleasing to put on a complete performance in the last game," said Latham.
"Shipley bowled fantastically well with the new ball, he found the right lengths on this wicket after we got a par score."
Ahmed led Pakistan's fightback from 66-4 as he added 97 for the fifth wicket with Agha Salman who scored run-a-ball 57 but New Zealand held their nerve to get last man Haris Rauf run out for one.
A holiday crowd of around 20,000 had come in anticipation of Babar Azam making his 100th ODI memorable but they were left disappointed when Pakistan skipper was caught off a miscued shot off Shipley for a five-ball one.
Before that opener Shan Masood had fallen for seven. Fakhar Zaman managed a laborious 64-ball 33 and Mohammad Rizwan fell for nine, leaving Pakistan struggling on 66-4.
"The way we planned, we couldn't finish it that way," said Azam.
"However, the entire series was outstanding. There were good performances. There were many positives, we were able to check on our bench strength."
Usama Mir scored 20, Shadab Khan 14, Shaheen Shah Afridi nought and Mohammad Waseem six but could not offer enough to support Ahmed.
New Zealand's innings was built around Young's 91-ball 87 and a 58-ball 59 from Latham after the visitors won the toss and opted to bat at the National Stadium.
New Zealand lost Tom Blundell for 15 and then Henry Nicholls for 23 before Young steadied the innings in a 74-run third wicket stand with Latham.
Young hit eight fours and two sixes and was looking set for a hundred but was smartly caught by wicketkeeper Rizwan off leg-spinner Shadab in the 30th over.
Mark Chapman upped the tempo with a breezy 33-ball 43 with two sixes and five fours, adding 56 for the fourth wicket with Latham.
Chapman was unlucky to be caught behind off the glove as he tried to sweep Shadab to leg side. He took 22 off one over from spinner Agha Salman.
Latham also holed out off spinner Mir in the 42nd over after hitting five boundaries.
Ravindra (28) and Cole McConchie (26) added useful runs before New Zealand were bowled in 49.3 overs.
For Pakistan, Shaheen took 3-46 while Mir and Shadab claimed two wickets apiece.
Pakistan won the first two matches by five and seven wickets in Rawalpindi before taking the next two in Karachi by 26 and 102 runs.