Indian captain Virat Kohli raises his bat to the Adelaide crowd after scoring his 39th ODI hundred. Photo: Sam Wundke/EPA

ADELAIDE – Veteran wicket-keeper Mahendra Singh Dhoni steered India to a six-wicket victory over Australia in the second one-day international to level the series in Adelaide on Tuesday.

Former skipper Dhoni, playing in his 334th ODI, coolly guided India across the line with four balls to spare to back up a dazzling century from captain Virat Kohli.

India successfully chased down a target of 299 set by Australia, who scored 298/9, with Shaun Marsh scoring 131 off 123 balls.

The three-match series now goes to a decider in Melbourne on Friday after Australia won the opening game in Sydney by 34 runs.

When Kohli holed out to Glenn Maxwell at deep mid-wicket to end his stellar knock of 104 off 112 balls, it was 37-year-old Dhoni who took charge to pilot his side home with 55 not out, with support from Dinesh Karthik with an unbeaten 25.

Dhoni was physically struggling in the hot conditions, and needed treatment from the team physiotherapist to finish his match-winning knock and keep India alive in the series.

India lost four wickets in their chase after Australia’s total.

Shikhar Dhawan hit out before he was snapped up by Usman Khawaja at mid-wicket off Jason Behrendorff for 32 from 28 balls in the eighth over.

India were sailing along before Sydney centurion Rohit Sharma top-edged Marcus Stoinis to deep forward square on 43, where Peter Handscomb – looking into the setting sun – took a safe catch to break up a dangerous 54-run partnership with Kohli.

Ambati Rayudu was the third wicket to fall, caught at deep mid-wicket by Stonis off Maxwell for 24.

Kohli was annoyed to get out with the job unfinished and six overs left, but Dhoni used his vast experience to get his team safely home.

Marsh hammered 11 fours and three sixes, claiming his seventh ODI century and second against India as Australia made the tourists sweat in the field in temperatures hovering around 40 degrees Celsius.

India could have been chasing an even higher total if not for the last three overs from Bhuvneshwar Kumar and Mohammed Shami.

They took a combined 4/17 in the last 18 balls, with Kumar claiming the big wickets of Marsh and Glenn Maxwell.

Maxwell had kicked along Australia’s scoring rate with a typically rumbustious knock of 48 off 37 balls at No 7.

Skipper Aaron Finch earlier struggled for runs before he was bowled by Kumar off an inside edge for six in the seventh over.

Finch was soon followed by opening partner Alex Carey, who attempted a pull shot off Shami, only to balloon a catch to Shikhar Dhawan at mid-wicket for 18.

Usman Khawaja put on 56 runs for the third wicket with Marsh before he was brilliantly run out by Ravindra Jadeja with a direct throw from cover point for 21.

Peter Handscomb threw away his wicket when he rashly tried to sweep Jadeja, but was well beaten and smartly stumped by Dhoni on 20.

Stoinis was caught behind off a short ball from Shami for 29, and Maxwell produced a lively cameo with Marsh before he was caught at long-off by Karthik.

Marsh followed in similar fashion two balls later when he was deceived by a slower ball from Kumar and lofted to Jadeja at long-off. The Australians lost four wickets for three off 11 balls before Nathan Lyon blasted a six off the final ball.

Kumar finished with 4/45 and Shami 3/58.