The blue-chip NSE Nifty 50 index ended 0.26% higher at 15,853.95, while the benchmark S&P BSE Sensex rose 0.25% at 52,904.05.

Markets had opened slightly lower on Wednesday as the biggest jump in U.S. inflation in 13 years reinforced expectations of tapering by the U.S. Federal Reserve, but a surge in domestic IT stocks helped erase early losses.

The Nifty IT index rose as much as over 3% to a record high. Shares of MindTree and Wipro jumped 9.3% and 7.2%, respectively, and were among the top boosts to the sub-index.

Larger rival Infosys was up 2.1% ahead of first-quarter results, with analysts expecting a rise in profit as global businesses expanded their digital offerings during the pandemic.

On Tuesday, S&P Global Ratings kept India's sovereign rating unchanged at the lowest investment grade of 'BBB-', and said recovery from the current economic slowdown depended on the government's ability to bring in reforms that spur investment and create jobs.

(Reporting by Shivani Singh in Bengaluru; editing by Aditya Soni)