The rally was led by strong showing in power, capital goods, PSUs, auto, realty and metal sector stocks amidst sustained capital inflows.
The 30-share Sensex soared by 481.87 points, or 1.95 per cent, to trade at 25,175.22 at 1215 hrs. The gauge had touched a lifetime high of 25,375.63 on May 16.
The NSE 50-share barometer Nifty regained the 7,500 mark for the first time since May 16 to trade at 7,504 by surging 135.15 points, or 1.83 per cent. It had touched an all-time high of 7,563.50 reached on May 16.
Brokers said buying activity gathered momentum as participants created widespread positions on hopes that the new Modi-led government will take steps to revive the economy.
They said covering-up of pending short positions by speculators in view of approaching monthly expiry in the derivatives segment on Thursday, also supported the rally.
The major gainers were Mahindra and Mahindra (5 per cent) Larsen and Toubro (5.93 per cent), BHEL (4.37 pc), Coal India (4.14 pc), NTPC (2.40 pc), ONGC (3.39 pc), Reliance Industries (0.38 pc), GAIL (2.03 pc), Sun Pharma (1.16 pc), ICICI Bank (1.84 pc), Axis Bank (2.90 pc), Tata Steel (2.30 pc), Maruti Suzuki (3.20 pc), Infosys (0.88 pc) and HDFC Bank (1.25 pc).