India created history after withstanding a spirited and tense Australia comeback to win an enthralling opening Test by 31 runs in Adelaide on Monday.

Entering the fifth and final day, India were in the box seat to draw first blood in their pursuit of a maiden Test series victory in Australia, with the hosts four wickets down and needing to produce a record fourth-innings run chase to claim an improbable victory.

India appeared set to cruise to victory at Adelaide Oval when Travis Head (14) and Shaun Marsh (60) fell in the morning session to leave Australia 156-6, but an inspiring rearguard display from Tim Paine (41), Nathan Lyon (38 not out), Pat Cummins (28) and Mitchell Starc (28) frustrated the visitors.

With only one wicket remaining and nerves palpable, Lyon almost singlehandedly achieved the impossible before Josh Hazlewood (13) was dismissed by Ravichandran Ashwin (3-92) with the final delivery prior to tea as India finally claimed their first victory in the opening match of a Test series in Australia.

Australia resumed on 104-4, requiring 219 runs to beat India, who made two crucial breakthroughs before lunch.

Ishant Sharma (1-48) caught Head off guard as the ball flicked the batsman's glove en route to Ajinkya Rahane and Australia's hopes of victory were dealt a major blow when Marsh departed following a valuable 10th Test fifty – the latter getting the faintest of edges off Jasprit Bumrah's delivery.

There were two reviews in an Ashwin over and Cummins survived both – India's first turned down before Australia successfully had a decision overturned three balls later, granting the tailender a reprieve.

There was no reprieve for Paine after lunch – the captain skying a pull shot, with his thick top edge taken easily by Rishabh Pant much to the joy of Bumrah (3-68).

Starc made a priceless contribution before temptation got the better of him, the big Australian attempting to blast Mohammed Shami (3-65) but it ended with an edge through to Pant.

Despite wickets falling, there was still a sense of belief in the middle, especially after Lyon was put down by Pant but India could breathe a sigh of relief when Virat Kohli showed a safe pair of hands to dismiss Cummins, giving Bumrah his third scalp.

Hazlewood came to the crease and played the ultimate support act to Lyon, who had India fearing the worst until Ashwin and KL Rahul combined to secure just the sixth Test win for the tourists in Australia.