BRISBANE, AUSTRALIA -- Cheteshwar Pujara took the hits and Rishabh Pant counterpunched as India chased down a record to win the Border-Gavaskar trophy with three wickets in hand and three overs to spare against Australia.

With the series tied 1-1 ahead of the fourth test, India needed only a draw to retain the trophy. But the injury-depleted India squad had a bigger target in mind and played with no fear to post the highest successful fourth-innings chase in a test at the Gabba, ending Australia's unbeaten streak dating to 1988 at the Brisbane venue.

Pant hit the winning boundary on Tuesday and finished unbeaten on 89 after a tenacious, three-hour innings. It was a fitting finale to a tension-filled series.

India resumed on 4 without loss and had 98 overs to chase a target of 328, or to survive three sessions for a draw.

No team had scored more than 236-7 in the fourth innings to win a test match at the Gabba. India reached 329-7 to win by three wickets, replacing the 1951 Australian team for that record.

To cap that, after never winning a test series on Australian soil until 2018-19, India has now done it twice on consecutive tours Down Under.

Opener Shubman Gill posted 91, Pujara absorbed no fewer than 11 hits in his 211-ball 56. Pant and later Washington Sundar (22) played some audacious shots that belied the pressure of the situation.

"It really means a lot to us. I'm just proud of each and every individual," India captain Ajinkya Rahane said. "Credit to Pujara, the way he handled the pressure was magnificent. And Rishabh was brilliant in the end."

In the third test last week in Sydney, India batted through the last four sessions to force a draw, with Pant and Pujara playing key roles. They went one better this time, against most expectations.

When paceman Pat Cummins (4-55) dismissed Rohit Sharma (7) in the 9th over, Pujura joined 21-year-old Gill in a 114-run stand that not only helped thwart the Australian attack but also kept India on track for an unlikely win.

Pujara continued with Rahane (24) after Gill was dismissed by Nathan Lyon and then joined forces with Pant after Cummins struck again to remove India's stand-in captain and make the score 167-3.

While Pujara kept taking blows to the helmet, hands and body in a stonewalling innings, Pant kept up the strike rate.

He took command when Cummins finally trapped Pujara lbw late in the evening session, and guided the partnerships with Mayank Agarwal (9) and Sundar that got India home. The noise from the crowd, only about 4,500 but mostly India supporters, increased with every scoring shot.

The India squad did a victory lap of the Gabba -- a rare sight for a visiting team -- to acknowledge their supporters in the stadium.

There was also a loud boo when Australia captain Tim Paine stood for his post-match interview.

"It's been a bit of a trend that we were found wanting in the key moments and completely outplayed by a tough Indian side that fully deserves the win," Paine said. "India's batters turned up, wore it on the body, toughed it out and kept soldiering on and took the game away from us late. You've got to give them credit for that."

Pant's 97 on the last day of the third test in Sydney was instrumental in helping India force a draw and keep the series level.

In Brisbane, India prevented Australia from getting into a position to score quickly and declare on day four, when Mohammed Siraj took his maiden five-wicket haul to restrict the hosts to 294 in the second innings.

India was without almost a dozen front-line players, including skipper Virat Kohli who returned home after the first test in Adelaide to be with his wife for the birth of their first child. Kohli was quick to congratulate the side in a tweet.

The bowling group was missing its biggest names. Ishant Sharma didn't tour, Mohammed Shami broke his arm while batting in the first test and his fellow fast bowler Umesh Yadav was ruled out after the second.

Leading spinner Ravichandran Ashwin missed the deciding test with an injured back and when pace spearhead Jasprit Bumrah was ruled out, India was left with one of its least experienced test bowling attacks.

Siraj, who made his debut in Melbourne, just weeks after his father died in India, led the attack in just his third test match. He was supported by Shardul Thakur, in his second test, and Thangarasu Natarajan on debut. Without Ashwin and allrounder Ravindra Jadeja, Sundar was given a test debut and performed exceptionally well with bat and ball.

The inexperienced attack achieved what the vaunted Australian bowling unit couldn't do at the Gabba, take 20 wickets.

For the whole series Australia retained the same bowlers who skittled India for 36 en route to winning the first test in Adelaide by eight wickets. Because of injuries, India used 20 players in four tests, but never lost intensity.

All the newcomers played with the kind of resolve and resilience which had already given the India squad the moral victory on long, arduous tour in the COVID era.

Rahane said Sundar's inclusion and all the inexperienced pacemen.

"All credit to them," he said. "After Adelaide we didn't discuss about what happened, we just wanted to play our game, show good attitude, show good character on the field. It was all about the team effort."