Markets bucked a broader downturn on Thursday as weak metal and oil prices drove beaten-down automakers to their best day since April 2020.
Nifty rose 0.93% to 15,556.65, while Sensex climbed 0.86% to 52,265.72.
The indices have added around 1.7% so far this week, after two consecutive weeks of decline fuelled by concerns over interest rate hikes and growth.
Aiding sentiment on Thursday was a further retreat in crude prices as investors assessed recession risks and the impact of higher rates on fuel demand. Cheaper oil tends to benefit oil-importing countries like India.
"Fall in crude oil prices gave some respite to the market, although concerns of persistent foreign investor selling and rising bond yields in the US will continue to keep traders on edge," said Shrikant Chouhan, head of equity research (retail) at Kotak Securities.
Analysts also said central bank commentary that inflation was expected to come down to 4% in 2023-24 was underpinning sentiment.
Nifty Auto was the best performing subindex, surging 4.4%. Recession worries sent metal prices sharply lower, boosting automakers which have grappled with rising input costs for several quarters.
The auto index had fallen around 6% this month, up to last close.
India's largest carmaker Maruti Suzuki gained the most on Nifty, rising 6.3% to its highest since late February. Truck maker Eicher Motors and two-wheeler maker Hero MotoCorp jumped 5.9% each.
Bajaj Auto jumped 4.1% after the two- and three-wheeler maker said it would consider a share buyback on Monday, after deferring the proposal last week.
Route Mobile also surged 8.5% on share buyback plans.
India's largest company Reliance Industries slipped for a second straight day, ending 1.6% lower and capping gains on the Nifty.