At close, Sensex was up 62 points or 0.08 per cent at 80,049 and Nifty was at 24,302, up 15 points or 0.06 per cent. This is the first time that the Sensex closed above 80,000.

Midcap and smallcap stocks outperformed the broader market. The Nifty Midcap 100 index closed at 56,618, up 325 points or 0.58 per cent and the Nifty Smallcap 100 index closed at 18,792, up 92 points or 0.49 per cent.

Tata Motors, HCL Tech, ICICI Bank, Sun Pharma, TCS, Infosys, Kotak Mahindra Bank and Mahindra & Mahindra were the top gainers. HDFC Bank, Bajaj Finance, Wipro, Tech Mahindra and L&T were the top losers.

On sectoral indices, Auto, IT, Pharma, Realty and PSE were among the major gainers. Services and FMCG majors were the laggards.

According to experts, "A surge in government spending and positive growth in corporate earnings are now supporting premium valuations. The return of FIIs to the domestic market and expectations of a rate cut in September are supporting market sentiment."