"Any movement in the markets till election results will depend on the positions investors have taken. If there is a huge short position, a rally may be on the cards but it will be short-lived since valuations are not cheap at present," AK Prabhakar, IDBI Capital, told NDTV.

Earlier in the day, Sensex surged as much as 1,482 points and the Nifty 50 Index climbed as much as 438 points.

Following gains in equity markets, the rupee strengthened by 86 paise or 1.23 per cent against the dollar to 69.36 during the session.

In debt markets, the yield on 10-year government bond maturing in 2029 fell 9 basis points to 7.27 per cent from previous close of 7.36 per cent.

Gains in today's session were led by buying in banking, auto, financials and realty sector shares with the gauge of banking shares - Nifty Bank Index - surging to a record high of 30,827.85.

All the 11 sector gauges compiled by National Stock Exchange ended higher led by a 7.8 per cent gain in the Nifty PSU Bank Index.

The Nifty Private Bank, Nifty Realty, Nifty Auto, Nifty Financial Services and Nifty Bank indexes also rose between 4.2 and 5.7 per cent each.

Buying interest was broad-based as the S&P BSE MidCap and S&P BSE SmallCap indexes advanced over 3.5 per cent each.

Adani Ports was the top gainer in the Nifty basket of 50 shares. The stock rose 11 per cent to Rs 407. Indiabulls Housing Finance, IndusInd Bank, State Bank of India, Tata Motors, Yes Bank, Grasim Industries, Larsen & Toubro, Yes Bank and HDFC were among prominent gainers, finishing between 10.6 and 6 per cent higher.