Australia snatched a sensational one-run win in the final one-day international against Pakistan after Glenn Maxwell bowled a 50th-over double-wicket maiden.
Pakistan had needed just two heading into the final over but somehow conspired to fall short to Maxwell's off-spin.
Sohail Tanvir was bowled trying to clobber the winning runs which exposed number 11 Mohammad Irfan, who swished at three dots before spooning a catch that James Faulkner clutched to his chest at short-cover.
Victory meant Australia won the series 3-0 and stayed at the top of the International Cricket Council's one-day international rankings.
"I got a bit of luck in the end," man of the match Maxwell said at the on-field presentation after the game.
"(Captain George Bailey) basically said don't get hit for runs. When you're in that situation you have to pray and hope."
Pakistan had done well to restrict Australia to 231 for nine after Steve Smith's 77, and 56 from David Warner, had set them up for more.
Tanvir hauled back Australia as he bowled Smith, en-route to figures of 3-40, while stand-in skipper Shahid Afridi took 2-44.
Asad Shafiq paced Pakistan's pursuit with his first half-century for over a year, but Australia were able to find a way to take wickets.
That was highlighted when Smith showed remarkable anticipation to read Fawad Alam's intention to paddle-sweep Xavier Doherty, and ran across from slip to take a catch down the leg side.
It was a portent of the drama to come as Pakistan had the required rate in check, but not their loss of wickets.
The last two wickets were therefore left needing 23 when Anwar Ali carved Faulkner to Maxwell at point.
The Maxwell-Faulkner partnership should then have accounted for Zulfiqar Babar with a run-out to the non-striker's end only for Australia to fail to appeal a decision that would have gone their way.
Faulkner collected Maxwell's throw and, after missing the stumps with his first attempt, he flicked off the bails only for the Australians to incorrectly conclude Babar must have made his ground by then.
It looked like it would be a costly presumption as the ninth-wicket pair took Pakistan to the brink of victory with Tanvir launching Maxwell for six in the 48th over.
The all-rounder was then left to deliver the last - after Bailey had sought to bowl out his quicks thinking he needed to end the game early - with Pakistan needing just two.
But Maxwell turned match-winner as Sohail was bowled again trying to clear the rope before Irfan confirmed why he bats last.