(CNN) -- New Zealand overcame an unlikely last-wicket century stand to defeat Pakistan by seven runs in the final one-day cricket international in Abu Dhabi and clinch the three-match series 2-1.
New Zealand opener Brendon McCullum slammed 76 at the top of the order, while Ross Taylor contributed a useful 44 to a modest total of 211.
Salman Butt and Khalid Latif gave Pakistan's reply a solid start before a collapse to 101 for nine only for Mohammad Aamer (73) and Saeed Ajmal -- who had earlier taken four for 33 -- put on 103 to carry their team to the brink of victory.
New Zealand opted to bat first and, after a steady start, McCullum soon lifted the scoring rate. He dominated an opening stand of 72 with Aaron Redmond, who eventually fell trying to hit Umar Gul over the top -- giving the seamer his 100th one-day wicket.
Martin Guptill was then quickly snaffled by off-spinner Ajmal, but McCullum and Taylor, who was dismissed for ducks in the two previous matches, shared a 50 stand.
That partnership was severed when McCullum was caught and bowled by Shoaib Malik, off a leading edge.
New Zealand lost their way thereafter, Scott Styris' run out triggering a collapse.
Ajmal ran through the middle order -- adding the wickets of Daniel Vettori, Jacob Oram and Kyle Mills as New Zealand's last six wickets fell for just 47 runs.
Pakistan's reply began with Latif dropped by McCullum off Mills on nought. The opener then drove the same bowler for three consecutive boundaries in his second over.
Butt joined in the strokeplay but Vettori, who had brought himself on in the ninth over, trapped Latif lbw. Butt was then run out responding to a suicidal call from Younus Khan, and the Pakistan captain himself departed immediately afterwards -- edging Shane Bond to Taylor at slip.
Pakistan then crashed from 47 for no loss to 86 for eight. Malik fell attempting to pull Mills, picking out Styris at deep square-leg; Umar Akmal was caught behind off Tim Southee and Shahid Afridi departed in similar fashion.
Kamran Akmal was Southee's second victim and, when Abdul Razzaq was run out, Pakistan had lost their last recognized batsman with 126 still required for victory.
Gul and Aamer then defied New Zealand's bowlers with a partnership that lasted a little more than 10 overs and contributed only 15 runs.
But it was the last wicket stand between Aamer and Ajmal which unexpectedly raised Pakistan's hopes and had the Kiwis sweating.
Aamer, who hit Vettori for three sixes in an over, clubbed the bowlers around and raised his half-century with a mistimed boundary off Mills.
The 10th-wicket stand lasted 16 overs - only for Oram to claim Ajmal as Pakistan fell just short.