Global cues remained positive.
The Sensex started lower, but quickly rebounded to hit the day's high of 31,260.77 after data showed retail inflation is on the way down, opening up space for RBI to lower rates.
The gauge closed with a marginal rise of 7.79 points, or 0.03 per cent, at 31.103.49. It had lost 166.36 points in the previous session.
The NSE Nifty ended down 9.50 points, or 0.10 per cent, at 9,606.90.