Indian shares snapped five sessions of losses on Wednesday and closed up over 1% as conglomerate Reliance Industries hovered near fresh peaks and auto stocks rallied, while investors awaited key corporate earnings amid concerns over runaway inflation.

The NSE Nifty 50 index closed 1.05% higher at 17,136.55 and the S&P BSE Sensex was up 1.02% at 57,037.50 following a sharp selloff late on Tuesday, after Russia said it was starting a new stage of what it calls its special military operation in Ukraine.

Both the indexes have clocked losses so far in April hurt by a recent rout in IT stocks after weak March quarter results by Infosys and Tata Consultancy Services.

On Wednesday, most of Nifty's major sub-indexes settled higher, auto stocks led the pack and settled up 2.2%.

IT stocks which have lost roughly 11% so far in April, closed up 1.2%.

HDFC Ltd snapped three sessions of losses and closed up 1.9%. The lender will sell 10% stake in its unit HDFC Capital Advisors to a unit of Abu Dhabi Investment Authority.

Reliance Industries closed up 2.9% at a six-month high and a few points away from fresh records, a day after Reliance Brands said it had signed a deal to buy a 51% stake in fashion label Abu Jani Sandeep Khosla.

Shares of cement maker ACC Ltd saw its best session since July 20 and settled up 7.4%, a day after it logged a rise in March-quarter revenue.

This pushed Nifty's Infrastructure index 1.3% higher.

Energy stocks, benefiting from firmer crude and higher power demand hopes, extended gains to a fourth day and settled up 0.88%.

(Reporting by Chandini Monnappa in Bengaluru; Editing by Uttaresh.V and Shailesh Kuber)