The gains came on the back of heavy volumes, amid expiry of monthly derivative contracts. The Sensex, which had gained 464 points in past two sessions, ended 130.55 points, or 0.62 per cent, higher at 21,164.52, a new all-time closing high.
The index today touched intra-day high of 21,205.44, just shy of the peak of 21,206.77 set on January 10, 2008.
Yesterday, it had closed at 21,033.97.
On similar lines, the broad-based National Stock Exchange index Nifty spurted by 47.45 points, or 0.76 per cent, to end at 6,299.15. It had earlier touched intra-day high of 6,309.05.
More From This Section
Also, SX40 index, the flagship index of MCX-SX, closed at 12,545.13, clocking a gain of 30.32 points or 0.24 per cent.
Brokers said foreign funds remained net buyers in Indian equities and better-than-expected earnings by leading companies raised further hopes of more capital inflows.
For the month of october, the BSE Sensex rose by 9.20 per cent, or 1,784.75 points.