The NSE Nifty 50 index ended 0.74% higher at 17,822.3, while the S&P BSE Sensex was up 0.75% at 59,744.88.

"The undertones for Indian markets have been positive, with good rainfall this season and good advance tax payments," Anita Gandhi, director at Arihant Capital Markets in Mumbai, said.

So far this year, Indian markets have been among the best performing ones globally, surging more than 25% each to surpass the United States and other emerging markets, as abundant liquidity and a pick up in business activity propelled equities.

The Nifty's IT Index ended 1.19% higher after falling 0.98%. Tech Mahindra, Tata Consultancy, Mphasis and HCL led the charge, gaining 1%-2.07% ahead of the September-quarter earnings season that kicks off this week.

The Nifty Energy Index jumped 2.8% to close at an all-time high.

State-run oil and gas explorer Oil and Natural Gas Corp led the gains with its 10.1% jump during the session -- its highest since July 2019.

Oil prices hit their highest levels in at least three years, after the world's major producers decided to keep a cap on crude supplies. While it stokes inflationary worries in the economy, expensive crude tends to benefit companies like ONGC. [O/R]

Telecom majors Bharti Airtel and Vodafone Idea ended 2.6% and 1.3% higher. Local media reported that India's telecoms department was reconsidering levying a one-time spectrum charge on telecom operators.

Investors now eye the outcome of a central bank's policy meeting later this week to get cues on the unwinding of its accommodative monetary policy.

(Reporting by Vishwadha Chander in Bengaluru; editing by Uttaresh.V)

By Vishwadha Chander