An unbeaten 89 from Rishabh Pant helped India seal a stunning 2-1 series win over Australia and inflict the hosts' first defeat at the Gabba since 1988.

On the final day of a pulsating four-match Test series where each match has produced drama of the highest order, there was one huge finale saved by the visitors for the conclusion of a gruelling tour.

With a record victory target of 328 set in Brisbane, India reached it with three wickets in hand and three overs left thanks to the efforts of Pant to retain the Border-Gavaskar Trophy.

Without captain Virat Kohli and a whole host of players, the tourists needed 324 more runs after they managed to dismiss Tim Paine's side for 294 on day four.

Pat Cummins dismissed Rohit Sharma cheaply on his way to four for 55, but it brought Cheteshwar Pujara to the crease and he was not prepared to give his wicket away without a fight.

Together with opener Shubman Gill, the pair put on 114 for the second wicket before Gill fell nine short of a century.

Nathan Lyon ended his enterprising innings which included eight fours and two sixes and when stand-in skipper Ajinkya Rahane was caught behind for 24, the Indians could have been forgiven for shutting up shop.

Wicketkeeper Pant had other ideas and after Cummins pinned Pujara in front for 56 to bring his 211-ball virgil to a conclusion, the 23-year-old continued to play with bravery.

Debutant Washington Sundar added a breezy 22 and helped take 11 off Cummins to kick start India into action with time running out.

It made the equation 39 off 42 and Pant moved into Twenty20 mode when he hit back-to-back fours off Lyon.

While Washington and Shardul Thakur departed in a dramatic finale, a drive by Pant to the boundary off Josh Hazlewood sealed a three-wicket victory for India and left Australia stunned.