The series may have been decided, but its fifth and final chapter was a 50-over exhibition that offered everything, as a glittering century from Manish Pandey carried India to its target of 331 with two balls to spare.

David Warner and Mitchell Marsh made their own hundreds to set up that score, while Rohit Sharma fell one run short in the chase.

But after breaking through for his first international century, Marsh couldn't seal a fairytale ending after being asked to defend 13 from the final over.

With Steve Smith having already gambled in bowling out John Hastings, Scott Boland and James Faulkner, responsibility was handed to the young all-rounder with a struggling MS Dhoni facing and Pandey on 98.

But after a strict call on a wide first ball, Dhoni powered Marsh's first legitimate delivery for six over Warner at long-off, before holing out to the same fielder but giving Pandey the strike.

With six needed from four balls, and another anxious newcomer in Gurkeerat Singh Mann at the other end, tension in the SCG crowd was at its height.

Pandey shrugged it off to expertly glide Marsh's wide yorker for four to raise his milestone, then struck two runs over the cover field to seal a memorable win.

It was all the more remarkable for a new international player who saw his team home after losing the best chasing batsman in the world, Virat Kohli, for 8.

But as the first Indian batsman to score an IPL century, a feat achieved at 19 years old, Pandey knows how to keep his cool.

Three times in this series India conceded record chases for the venue: in Perth, Brisbane and Melbourne.

Then they were well on track to produce their own record chase in Canberra, but fell apart.

Stung, they pulled off a record chase at the SCG instead. By now such things have become routine.

Fast start from Dhawan and Sharma

As in Canberra, Shikhar Dhawan and Rohit Sharma got them off to a fast start.

Dhawan was the faster and more furious, in a shiny sports-car of an innings featured by him repeatedly walking down the track to cut, to cover drive, and once even to play a late uppercut over backward point.

He was especially punishing off his legs, whipping and sweeping three sixes in his first fifty runs, before falling to the walking cut shot for 78 from 56 balls when Shaun Marsh took an absolute hanger running back at deep point - "a Sydney Swans mark on the wing," as Grandstand's Quentin Hull put it.

Sorry, this audio has expired Grandstand At Stumps: Fifth ODI

Rohit proceeded more sedately, finding the boundary with classical drives either side of the wicket before opening up after he passed 50.

But after Shaun Marsh balanced his ledger by dropping a simple catch when Rohit was on 92, the batsman feathered a glide against Hastings to Matthew Wade on 99.

Rohit may have cried out in disbelief when the finger went up, but the dormant DRS technology confirmed the edge.

By then Kohli was long gone, Hastings having removed the dangerous Indian top three, and with Dhoni struggling for timing and 100 required from 91 balls, it was all on Pandey.

Without going beserk on boundaries he kept the runs flowing, especially with cleverly placed sequences of twos, and even with Dhoni's sporadic runs of dot balls, the pressure mounted on Australia as well.

Errors from Australia as the pressure mounts

Nathan Lyon dropped a high ball from Dhoni on 7, Faulkner hung back at third man instead of rushing forward, George Bailey couldn't reach a diving catch at mid-off, and when the ball did rise into the air it kept falling safely between would-be catchers.

Hastings had bowled out by the 39th over in search of wickets, then Boland by the 44th, with Lyon's drop coming in Boland's second-last over.

From there it was down to Faulkner and Mitchell Marsh, but having taken the equation to 35 from the last three overs, the batsmen steadily reeled it back in.

Dhoni allayed the frustration of his innings with a crucial four and that six, finally departing for 34, having protected the lower order that was so badly exposed in Canberra, and having set up Pandey to hold his arms aloft in triumph.

What a different experience for Mitchell Marsh, who had been as elated earlier with his own final-over ton.

In a summer where he has had few opportunities with the bat, finally he was needed when he came in at 4 for 117 in the 20th over.

Richard Kettleborough had had his revenge after Aaron Finch had smashed a drive into his leg in Canberra, the umpire fittingly firing Finch leg-before-wicket for not offering a shot on 6, though the ball would have missed the off stump.

Debutant pace bowler Jasprit Bumrah, who bowls with a strange straight-arm bowling action that looks like he's doing a Superman impersonation, managed to defeat Australia's own superhero Steve Smith with a brisk short ball mistimed to Rohit at short midwicket for 28.

Marsh settles in for big partnership

Bailey got a leading edge for 6, and Shaun Marsh was run out after a brilliant throw by Umesh Yadav for 7. But his brother settled in with Warner for a 118-run partnership.

It was a sensible and responsible innings from Warner, who consolidated for a long time before he accelerated, but scored quickly enough to let Marsh start slowly and build.

When Warner was dismissed in the 39th over for his fifth ODI hundred, Marsh had just passed 50. Over the last 10 overs the junior batsman became the senior.

Wade helped with a few big shots, but mainly it was Marsh, straight driving with authority, nearly taking out Ishant Sharma a couple of times, giving Kettleborough another scare, and producing absurd shots like front-foot pulls for six or front-foot cuts for four.

With all his batting frustrations, the debut century loomed large for Marsh, with a future significance beyond the confines of this match.

Whether that distraction got the better of him, he struggled in the last two overs, four runs from eight balls his return, while Hastings was equally happy to take singles in the last over and keep giving Marsh back the strike.

That was enough to get Marsh to his target with three balls to spare. But it wasn't enough to get the target beyond India, and Australia may be ruing the extra dozen runs they left out there.

In the end it was Pandey who was left celebrating, and who will remember his debut century more sweetly.