Glenn Maxwell and Alex Carey scored magnificent centuries as Australia claimed a three-wicket victory over England in a thrilling ODI series decider at Old Trafford.

Australia had been reduced to 73-5 in response to England's 302-7 and looked to be on the brink of defeat, but they were rescued by their highest-ever ODI sixth-wicket partnership of 212.

Maxwell hit seven maximums as he racked up 108 runs from 90 balls – his highest score in the 50-over format – while Carey added 106 for his maiden ton.

Both players were dismissed as part of a dramatic finale, but Mitchell Starc and Pat Cummins got the 10 runs required from the final over as the tourists won with just two balls to spare.

Earlier, an astonishing start to Wednesday's play saw England lose Jason Roy and Joe Root in the first two deliveries of the day, as Starc set about dismantling England's top order.

Yet Jonny Bairstow (112) led a superb counter-attack that had not only given the hosts a fighting chance, but put Australia on the back foot.

Chris Woakes and Root took two wickets apiece in the early stages of Australia's reply as England took control.

But Maxwell and Carey's heroics flipped the script and meant it was Australia who won 2-1, avenging their loss by the same scoreline in the trio of T20I matches.

England won the toss and Eoin Morgan chose to bat, though the captain found himself out in the middle just three deliveries in.

Having survived the rest of Starc's first over, Morgan (23) and Bairstow began the fightback with some crunching boundaries from Australia's pace attack, with Sam Billings (57) and Woakes (53 not out) ensuring the innings finished with a flourish despite spinner Adam Zampa taking 3-51.

Australia's top order fared little better than their England counterparts – Aaron Finch (12) and Marcus Stoinis (4) falling to Woakes (2-46), while Root came up with an impressive cameo to dismiss David Warner and Mitchell Marsh.

It looked like game over when Marnus Labuschagne was cheaply run out, while Carey would have been out early if not for Jofra Archer's no ball and Maxwell survived a review off the bowling of Adil Rashid (1-68).

But they were tremendous in taking Australia to the brink of victory, which was all but sealed when Starc smashed Rashid – who had dismissed Maxwell - for a six off the first ball of the final over in England's first home ODI series defeat in five years.