The BSE Sensex rose on Wednesday to close at a three month high with the index closing just shy of the key psychological level of 20,000 as shares in mortgage lender HDFC hit a record high after an earnings beat.
Lupin shares also closed at their all-time high after the drugmaker's quarterly results beat expectations, while hopes for continued foreign inflows also lifted index heavyweights such as cigarette maker ITC.
Although foreign portfolio investors have so far bought $12.34 billion of Indian stocks in 2013, the outlook still remains robust amid global shares rising to new five-year highs.
Still, traders said the near-term outlook for markets would depend on the outcome of the election in Karnataka and the Supreme Court decision on accusations the law minister interfered with CBI investigation into irregularities in the award of coal field concessions.
Both issues have raised fears about political instability, although a resounding victory from Congress party in Karnataka would help soothe those concerns.
"Hot money, liquidity will continue to drive markets amid potential challenges coming from Karnataka polls and the Supreme Court's verdict," said Deven Choksey, managing director at KR Choksey Securities.
The Sensex rose 0.51 percent, or 101.23 points, to end at 19,990.18, marking its highest close since January 30.
The broader Nifty rose 0.43 percent, or 25.75 points, to end at 6069.30, closing above the psychologically important 6,000 level for the second day and its highest close since January 28.
Dealers say macroeconomic triggers such as the consumer price index and industrial production data due on Friday, followed by wholesale inflation data on Monday, will also be watched.
India's factories lost momentum in April as output grew at its weakest pace in more than four years, but a jump in export orders augured well for the coming months, a survey showed on May 2.
Broad-based buying on expectations of strong foreign inflows lifted index heavyweights such as ITC Ltd , which rose 2.2 percent, while Reliance Industries ended 0.2 percent higher.
HDFC, India's biggest mortgage lender, rose 3.7 percent, closing at its all-time high, after it reported a 17.3 percent rise in net profit for the Jan-March quarter.
Lupin shares also gained 2.2 percent to scale an all-time high after the company said quarterly net profit more than doubled to 4.08 billion rupees.
Shares in Corporation Bank gained 6.6 percent after it said non-performing loans as a percentage of total assets were at 1.19 percent in the March quarter, down from 1.63 percent in the December quarter.
Corporation Bank's quarterly net profit beat expectations, helped by lower provisions.
Glenmark Pharmaceuticals shares rose 1 percent after it posted a quarterly profit rise by 11.3 percent to 1.67 billion rupees.
However, Ranbaxy Laboratories shares lost 2.6 percent after it reported a 90 percent drop in first quarter net profit compared with a year earlier.