It was some profit booking at the higher levels and Nifty holding above the 4,900 mark. The market breadth was negative as the midcap and smallcap indices underperformed.
Bharti, Hindalco and Cipla are among the top gainers on the indices. PSU refineries HPCL and BPCL have surged on the bourses.
Among the top losers are Bajaj Auto, Hero Honda, Reliance Petro, GAIL, Maruti Udyog and SBI.
Dollar has gained some strength against the rupee helping the IT stocks to stabilise.
Sensex was up 53.71 points or 0.32% at 16899.54, and the Nifty up 6.65 points or 0.13% at 4938.85.
About 1228 shares have advanced, 1735 shares declined, and 69 shares are unchanged.
The BSE Midcap Index ended at 7,313.33 up 0.04%.
The BSE Smallcap Index ended at 8,967.51 up 0.05%.
The BSE Bankex was down 0.5% at 8,921.74. Oriental Bank, Centurion Bank, Allahabad Bank, Karnataka Bank, Bank of Baroda moved downwards.
The BSE Capital Goods Index was up 0.5% at 14,763.61. Areva T&D, Punj Lloyd, Alstom Projects, Bharat Bijlee, AIA Engineering closed lower.
The BSE Health Care Index was up 0.6% at 3,687.60. Nicholas Pirama, Lupin, Divis Labs, Cadila Health closed higher.
The BSE Auto Index closed at 5,252.96 down 1%. Tube Investment, Hero Honda, TVS Motor, Mah and Mah, Escorts closed lower.
The BSE Metal Index closed at 13,080.83 up 0.4%. JSW Steel, Jindal Saw, Hindalco, Hind Zinc, JindalStainless closed higher
The BSE FMCG Index closed at 2,156.35 up 0.1%. United Spirits, Dabur India, United Brewerie, Colgate, HUL closed higher.
BSE Oil and Gas Index closed at 9,777.51 up 1.3%. Petronet LNG, Essar Oil, BPCL, IOC, HPCL ended in green.
The BSE IT Index closed flat at 4,348.62. Satyam, HCL Tech, Tech Mahindra, Infosys closed lower.
The BSE realty Index lost 3% at 9,085.47. Unitech, Phoenix Mills, Ansal Propertie, Mahindra Gesco, DLF closed lower.
The NSE cash turnover was at Rs 17784.95 crore and the NSE F&O turnover was at Rs 83677.53 crore. The BSE cash turnover was Rs 7468.09 crore. Total market wide turnover was at Rs 108930.57 crore.