After a lower start at 20,241.12, the BSE Sensex slipped to 20,076.10 before scripting a recovery in afternoon trade to end at 20,261.03 -- logging a gain of 49.10 points, or 0.24 per cent.
The gauge had edged up nearly three points yesterday.
Between January 24 and February 3, the BSE index plunged over 1,100 points as the BSE Sensex witnessed falls in six days out of seven.
In the 30-share BSE Sensex today, 17 stocks gained and 12 ended with losses while Cipla remained unchanged.
The 50-share NSE Nifty rose 21.50 points, or 0.36 per cent, to close at 6,022.40 led by auto and metal shares.
"Markets opened on a flat note and showed weakness in first part of trading day. The latter part saw good recovery from lows," said Nidhi Saraswat, Senior Research Analyst, Bonanza Portfolio.
Short covering was seen in banking and capital goods stocks which have been beaten down, according to Shrikant Chouhan, Head- Technical Research, Kotak Securities.
A mixed trend in the Asia and higher opening in Europe after an overnight surge in the US markets, helped sustain some momentum, brokers said.
Sectorally, the BSE Auto sector index gained the most by rising 1.63 per cent, followed by Metal index 1.60 per cent. Realty index 1.59 per cent and IT index 0.95 per cent.
Overall, nine of the twelve BSE sectoral indices gained.