The NSE Nifty 50 index ended up 1.21% at 17,245.05, while the S&P BSE Sensex rose 1.23% to 57,521.06.

Both the indexes fell sharply in the previous session as news of Russia cutting gas supplies to Eastern Europe, prospects of aggressive U.S. interest rate hikes, and worries over surging inflation and stringent pandemic-related curbs in China hurt risk appetite.

In India, Nifty's FMCG sub-index rose 2.2%, driven by a 4.5% jump in Hindustan Unilever after the firm's quarterly profit rose and beat analysts' estimates.

Foreign investors are in selling mode, while domestic investors are positive and will focus on defensives like consumption and domestic growth sectors, said Vinod Nair, head of research at Geojit Financial Services.

Shares of Reliance Industries extended gains for a third session and rose 1.5% to hover near record highs.

Late on Wednesday, the conglomerate said an investment company set up by Rupert Murdoch's son James and former Disney India executive Uday Shankar will invest $1.8 billion in Reliance's broadcasting business, Viacom18.

Power stocks continued to rally, with Adani Transmission, Power Grid and NTPC gaining between 2.5% and 3.1% as demand for power surged amid an intense heat wave, disrupting industrial activity.

European shares rallied in morning trade on Thursday, as forecast-beating results from companies helped set aside worries about slowing global economic growth.

Meanwhile, Bajaj Auto fell 1.8% and was the top loser on the Nifty 50 index after March-quarter results.

(Reporting by Nallur Sethuraman and Chandini Monnappa in Bengaluru; Editing by Maju Samuel)