Benchmarks ended at fresh lifetime highs on Wednesday, powered by a rally in market heavyweight RIL and banking stocks amid mixed global cues.
The Nifty Bank index also breached the 28,000 level for the first time.
Sustained FII inflows and fresh spell of buying by domestic institutional investors propped up the bourses, brokers said.
Encouraging first quarter earnings and mixed trend in global markets, with US stocks approaching fresh all-time highs, too bolstered sentiment, they added.
Reliance Industries spurted 2.85 per cent to close at a fresh high of Rs 1,217.25.
The 30-share Sensex, after a cautious start, gathered momentum and rallied to 37,931.42, before finally ending at 37,887.56, a rise of 221.76 points, or 0.59 per cent.
It broke its previous closing record of 37,691.89 hit on August 6.
The broader NSE Nifty extended its record run for the fourth straight session by rising 60.55 points or 0.53 per cent to 11,450.
It surpassed its previous closing high of 11,389.45 hit on Tuesday.
Foreign portfolio investors (FPIs) bought shares worth a net Rs 314.83 crore, while domestic institutional investors (DIIs) sold equities worth Rs 319.90 crore on Tuesday, provisional data showed.