The Sensex, which had lost 194 points in previous day's trading, gained 54.48 points at 19,837.99, after touching the day's high of 19,984.13 and a low of 19,735.21.
Similarly, the wide-based National Stock Exchange index Nifty rose by 31.90 points at 5900.65, after touching the day's high of 5952.25 and a low of 5868.90 points.
The major support to the market came in from sectors like metals, oil and gas, bank and public sector undertaking.