However, a recovery from what some analysts call the oversold region came with limited confidence ahead of the presentation of the 2013-14 Budget late this month and doubts about whether the Reserve Bank of India (RBI) would cut interest rates aggressively this year.
Data on Tuesday showed industrial output unexpectedly contracted in December, but January consumer price-based inflation remained above 10 per cent, creating more uncertainty about whether the RBI would focus on slowing growth or on sticky inflation.
The Sensex rose 0.52 per cent, or 100.47 points, to end at 19,561.04, marking its first session of gain in nine. The Nifty rose 0.42 per cent, or 24.65 points, to end at 5,922.50, closing above the psychologically important 5,900 level.
Among gainers, shares in state-run ONGC rose 3.8 per cent a day after its October-December net profit beat market expectations. Shares in Tata Motors rose 2.6 per cent, marking its second day of gains on expectations the auto maker would post on Thursday better-than-expected results for the December quarter.
Coal India shares rose 2 per cent ahead of its December quarter earnings on Wednesday.
Exide Industries shares gained 1.4 per cent after Bank of America Merrill Lynch upgraded the stock to "buy" from "underperform," given expectations of an "an imminent increase in pricing power in automotive batteries.
Among stocks that fell, Unitech dropped 17.6 per cent — its biggest daily percentage fall since January 7, 2009.