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.
Gains logged by 21 Sensex stocks including SBI, ICICI Bank, RIL, TCS, Bharti Airtel, ONGC, Tata Steel and GAIL India helped the Sensex extend its winning run.
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.
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.
Sectorally, the BSE Consumer Durables index gained the most by rising 2.65 per cent, followed by PSU index (2.47 per cent), Banking index (1.93 per cent), Metal index (1.73 per cent) and Oil & Gas index (1.44 per cent).
For the month of october, the BSE Sensex rose by 9.20 per cent, or 1,784.75 points.