IT major Wipro was the biggest Sensex gainer at 2.95 per cent, followed by Bajaj Auto at 2.14 per cent.
IT stocks were in demand with Infosys trading near its all-time high level of Rs 3,782 apiece, traders said.
Markets may remain volatile in the coming few days ahead of Futures and Options expiry on Thursday, they said.
After resuming higher, the Sensex touched day's high of 20,912.54 but settled at 20,852.47, a rise of 41.03 points from its last close. It has gained 315.83 points or 1.54 per cent in the last three trading days.
More From This Section
BHEL at 1.92 per cent, Cipla 1.90 at per cent, Bharti Airtel at 1.57 per cent Hindalco Industries and 1.39 per cent were some other big Sensex gainers.
Among the sectoral indices, consumer durables was the top gainer, up by 2.98 per cent, followed by IT and Technology, up by more than 0.80 per cent each. Auto and capital goods were up by over half a perc ent each. Metal was the top loser, down by 1.85 per cent.
Jignesh Chaudhary, Head of Research, Veracity Broking Services, said it was a mixed day of trading which started on a positive note, but slipped to to the negative terrain. It recovered from day's low to close on a positive note towards the end of the trading session.