In a range-bound session, benchmark BSE Sensex ended higher by 19 points at 28,372.23, snapping its two-day losing spell, on fag-end buying in banking, auto and consumer durables amid positive European cues.
The 30-share index resumed lower at 28,345.49 and dropped further to 28,259.38 due to initial heavy selling pressure as wholesale inflation soared to a two-year high of 3.74 per cent in August.
Industrial output contracted by 2.4 per cent in July, reflecting the worst performance in 8 months mainly due to declining output in manufacturing and capital goods sectors.
However, the consumer inflation eased to a five-month low of 5.05 per cent in August, mainly because of a slower rate of price increase in vegetables as well as food and beverages.
However, the Sensex recovered to 28,416.41 before ending at 28,372.23, showing a gain of 18.69 points or 0.07 per cent.
The gauge had fallen by 691.74 points in the previous two sessions.
The 50-share Nifty too settled 11 points or 0.13 per cent higher at 8,726.60 after moving between 8,739.85 and 8,688.90.
Of the 30-share pack, 17 closed with gains, while 13 ended in negative terrain.
Brokers said renewed expectations that RBI may announce a cut in its rate at its meeting next month, after retail inflation fell to a five-month low, triggered buying in banking and a few other stocks.
Among banking scrips, state-run SBI gained the most by rising 1.94 per cent to Rs 257.60, Axis Bank climbed 1.71 per cent to Rs 602.30 and ICICI Bank rose 1.06 per cent to Rs 271.60.
Other gainers in the Sensex kitty included, Adani Ports, Tata Motors, NTPC, Hero MotoCorp, Cipla, Dr Reddy's, Asian Paints, GAIL, L&T, Bajaj Auto, Maruti Suzuki and Bharti Airtel, rising by up to 2.93 per cent.
Coal India suffered the most by diving 1.72 per cent to Rs 325 after the company reported a 14.7 per cent decline in consolidated net profit for the quarter ended June 30.
Tata Steel, however, rose 0.04 per cent to 373.75 despite the company's net losses mounted manifold to Rs 3,183 crore on consolidated basis in the first quarter ended June 30.