The blue chip NSE Nifty 50 index closed up 0.66% at 15,790.45 and the benchmark S&P BSE Sensex gained 0.75% to end at 52,699.

Both indexes scaled all-time highs this month, driven by declining COVID-19 cases, easing of pandemic-led curbs in several states, and a recent record surge in daily vaccinations. However, expiry of monthly contracts for June led to a pullback in the last two sessions.

On Thursday, technology stocks were back in focus, with the Nifty IT index closing 2.79% higher after three sessions of losses in the past four. Software services firms Infosys and Tata Consultancy Services were the top boosts to the Nifty 50, adding more than 3.4% each.

Conglomerate Reliance closed 2.4% lower, and was the top drag to the Nifty 50. At its annual general meeting, Chairman Mukesh Ambani said he expects the company to formalise its partnership with Saudi Aramco this year, but did not provide any specific details.

Aramco Chairman Yasir Al-Rumayyan will also join Reliance's board as an independent director.

In other stocks, Speciality Restaurants, the owner of well-known domestic brands such as Mainland China and Oh! Calcutta, added 4.8% after reporting a March-quarter profit versus a loss a year ago.

Apollo Hospitals Enterprise, which runs 70 hospitals across the country, lost 1.3% after reporting a fall in its March-quarter profit. The company also reorganised its offline pharmacy business and digital healthcare platform into a new unit.

Iron and steel manufacturer Shyam Metalics and Energy and auto components maker Sona Comstar both gained over 20% in their stock market debuts.

(Reporting by Anuron Kumar Mitra in Bengaluru; Editing by Shinjini Ganguli)