Australia pulled off a sensational six-run win against Pakistan despite hundreds from debutant Abid Ali and Mohammad Rizwan in the fourth ODI in Dubai to go 4-0 up in the series with one match to go.
Chasing 278, Pakistan were brought close by Abid Ali's 112 and Rizwan's 104 but in the end, Pakistan failed to get 17 off the Marcus Stoinis's last over.
Glenn Maxwell missed his second career hundred by just two runs, while Usman Khawaja (62) and Alex Carey (55) helped Australia
Ali and Rizwan had put Pakistan on course for victory with a 144-run third-wicket stand but once Ali departed off Adam Zampa in the 42nd over, the innings wilted under the pressure.
Both Umar Akmal and debutant Saad Ali fell for seven each to paceman Nathan Coulter-Nile who finished with 3-53 while Stoinis had Rizwan and Usman Shinwari (6) in the final over to seal the win.
Ali was drafted into the side after Imam-ul-Haq went down with fever hours before the start of play.
Ali is the 15th batsman to score a hundred on ODI debut. Salim Elahi (102* v Sri Lanka at Gujranwala in 1995) and Imam (100 v Sri Lanka in Abu Dhabi 2017) were the other two Pakistani batsmen to achieve the feat in ODI debuts.
Earlier, Maxwell lifted Australia from 140-5 with his 98-run effort that included three sixes and nine fours.
Pakistan was led by Imad Wasim after Shoaib Malik was ruled out with a rib injury.
Dropped on 10 by Rizwan off Yasir Shah, Maxwell repaired the innings with a 134-run partnership for the sixth wicket with Carey.
Maxwell got another reprieve when he was bowled by Usman Shinwari off a no-ball when on 76.
The pair of Carey and Maxwell beat the previous sixth-wicket stand in Australia-Pakistan ODIs of 90 between Dirk Wellham and Rod Marsh at Sydney in 1981.
Australia lost Aaron Finch for 39 while Usman Khawaja made 62 off 78 balls before he was trapped in front by Yasir who finished with 2-57.
Wasim (2-56) dismissed Shaun Marsh (5) and Peter Handscomb (7) while Mohammad Hasnain (2-52) removed Finch and Carey.