The NSE Nifty 50 index rose as much as 0.52% to its best intraday level since late February in early trade, but ended just 0.05% higher at 11,472.25 for a third straight day of gains.
The S&P BSE Sensex closed up 0.12% at 38,843.88, after having crossed the 39,000-level in early trading for the first time since March 2.
Conglomerate Reliance Industries Ltd, India's largest firm by market value, fell 0.7% after a modest rise on Monday. The stock has more than doubled in value since late March on a slew of foreign investments into Reliance's digital arm.
The top four boosts on the Nifty 50 were all financial stocks. Bajaj Finance jumped 4.8%, while ICICI Bank Ltd, State Bank of India and Kotak Mahindra Bank gained between 1.1% and 3.4%.
Analysts said Tuesday's rise reflected an upbeat global mood in the absence of any major domestic catalysts, following recent gains on better-than-feared corporate earnings and management commentary.
Other global shares also rose, propped up by the United States and China saying they are still committed to their Phase 1 trade deal, and increased optimism around COVID-19 vaccine development.
Shares in Adani Enterprises Ltd ended 23.7% higher following a report on Monday that the conglomerate was in talks to buy out some of its partners in the entity that runs Mumbai's international airport.
(Reporting by Sachin Ravikumar; Editing by Ramakrishnan M.)