At 2:30 pm, the Sensex traded 3.39 per cent or 1,285.04 points higher at 39,215.81 and the Nifty was up 377.75 points or 3.31 per cent, at 11,784.90.

HDFC, Reliance Industries and HDFC Bank contributed the most to the advances on Sensex.

Some analysts expect a rally in the markets till the election results due on Thursday.

"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.

The poll of polls, an aggregate of exit polls, gives the BJP-led National Democratic Alliance (NDA) 302 of 543 seats. (Read more: NDA to form government comfortably, predicts poll of polls)

"A stable government will be best for the markets," he said.

Equities in other Asian markets were steady as investors tried to catch their breath following another week of escalating trade tensions between the US and China. MSCI's broadest index of Asia-Pacific shares outside Japan tacked on 0.6 per cent in early trade, after a 3 per cent loss the previous week. Japan's Nikkei index added 0.4 per cent, after data showed growth in the world's third-biggest economy unexpectedly accelerated in the first quarter.

The rupee appreciated to 69.44 against the dollar in intraday trade, marking a gain of 79 paise compared with the previous close.