Aamir, 17, hit an unbeaten 73 for his maiden half-century — the highest score by a number ten batsman in a one-day international — to bring Pakistan, chasing 212, close to an unexpected victory after they were 101-9.
Pakistan were bowled out for 204, giving New Zealand a sensational 2-1 victory in the three-match series. Pakistan won the first match by 138 runs on Tuesday before New Zealand levelled the series with a 64-run win on Friday.
Aamir and Ajmal added a Pakistan record of 103 for tenth wicket but, needing eight off the last over bowled by Jacob Oram, Ajmal holed out for a career-best 33 to end a sensational match.
The previous highest one-day score for a number ten batsman was 56 not out, made by Zimbabwe’s Douglas Marillier against India at New Delhi in 2002.
When Ajmal joined Aamir Pakistan needed a mammoth-looking 112 runs in 16.5 overs, but Aamir set the tempo for an unexpected win by hitting Daniel Vettori for three sixes in one over.
Slowly and gradually, he and Ajmal approached the target, beating the previous tenth wicket partnership record by Pakistan in all one-day of 72 by Abdul Razzaq and Waqar Younis against South Africa at Durban in 1998.
Aamir, who hit seven boundaries and three sixes during his 81-ball knock, improved on his previous highest score of 24 made against Sri Lanka earlier this year.
In the end New Zealand kept their nerves and did not spoil the early good work by bowlers which saw Pakistan slump from 47- to 101-9.
Earlier, off-spinner Ajmal took a career-best 4-33 to raise hopes of a Pakistan win but Salman Butt (25), Khalid Latif (19), Umer Akmal (12) and Shoaib Malik (11) threw away wickets.
Pakistan got off to a solid 47-run start before Vettori triggered a slump, trapping Latif leg-before in the ninth over. That started the slump.
Captain Younus Khan continued his wretched form, edging Shane Bond to slips after making just three. In the previous over, Younus misjudged a single which resulted in Butt’s run out.
Umer Akmal (12), Malik (11), Afridi (five) and Akmal (four) played reckless shots as Pakistan slumped badly.
Earlier Brendon McCullum, who scored a brilliant hundred on Friday, stood out once again with an aggressive 78-ball 76 which included three sixes and six boundaries.
New Zealand were well on course for a big score but once McCullum got out, caught and bowled by Shoaib Malik, Pakistani spinners led by Ajmal sparked a middle-order collapse to take last seven wickets for 47 runs.
New Zealand had raced to 72 by the 12th over, with McCullum reaching his fifty off just 47 balls.
It was paceman Umar Gul who provided the breakthrough, removing opener Aaron Redmond caught off Aamir for 21. This was Gul’s 100th wicket in 67 one-day internationals.
Ajmal then came into his own, removing Martin Guptill (eight), Ross Taylor (44), Daniel Vettori (15) and Jacob Oram (two) to improve on his best one-day figures of 2-16 against the West Indies at Johannesburg in September this year.
Ross Taylor, who failed to score in the first two matches, helped McCullum add 50 for the third wicket before Ajmal trapped him leg-before.
Both teams now move to Dubai where they play two Twenty20 matches on November 12 and 13.
Scoreboard
New Zealand:
B. McCullum c and b Malik 76
A. Redmond c Aamir b Gul 21
M. Guptill c Younus b Ajmal 8
R. Taylor lbw b Ajmal 44
S. Styris run out 14
D. Vettori lbw b Ajmal 15
N. Broom lbw b Afridi 0
J. Oram lbw b Ajmal 2
K. Mills c Ajmal b Aamir 4
S. Bond not out 11
T. Southee c Razzaq b Aamir 4
Extras: (lb6, w6) 12
Total: 211
Fall of wickets: 1-72 (Redmond), 2-88 (Guptill), 3-138 (McCullum), 4-164(Styris), 5-187 (Taylor), 6-188 (Broom), 7-190 (Vettori), 8-194 (Oram), 9-198 (Mills)
Bowling: Aamir 8.3-0-41-2, Gul 8-1-47-1 (2w), Razzaq 3-0-19-0, Ajmal 10-0-33-4, Afridi 10-0-33-1 (3w), Malik 7-0-32-1 (1w) Overs: 46.3 Pakistan:
Salman Butt run out 25
Khalid Latif lbw b Vettori 19
Younus Khan c Taylor b Bond 3
Shoaib Malik c Styris b Mills 11
Umer Akmal c McCullum b Southee 12
Shahid Afridi c McCullum b Oram 5
Kamran Akmal c Vettori b Southee 4
Abdul Razzaq run out 0
Umar Gul c Redmond b Oram 6
Mohammad Aamir not out 73
Saeed Ajmal c Mills b Oram 33
Extras: (b4, lb4, nb1, w4) 13
Total: 204
Fall of wickets: 1-47 (Latif), 2-51 (Butt), 3-51 (Younus), 4-74 (Malik), 5-82 (Umer), 6-84 (Afridi), 6-86 (Akmal), 8-86 (Razzaq), 9-101 (Gul)
Bowling: Mills 10-1-62-1 (1w), Bond 10-1-46-1 (2w), Vettori 10-2-42-1, Southee 10-0-26-2, Oram 9.1-2-20-3 (1nb, 1w)
Overs: 49.1
Result: New Zealand won by seven runs
Toss: New Zealand
Umpires: Bruce Oxenford (AUS), Nadeem Ghouri (PAK)
Tv Umpire: Zameer Haider (PAK)
Match Referee: Andy Pycroft (ZIM)