In a volatile session, the Sensex gave up a major part of its mid-session gains to close with a modest 45-point rise today after IT shares, led by Infosys, countered declines in ICICI Bank and L&T ahead of IIP data.

The 30-share BSE barometer started the day on a positive note after Infosys shares surged after posting 21.4 per cent rise in net profit for the third quarter ended December 31 and raising its revenue growth forecast for the next fiscal. Its peers like TCS, Wipro and HCL Tech also saw smart gains.

After hitting a one-week high of 20,971.23, up by almost 258 points, the Sensex started losing momentum in late afternoon deals on emergence of selling amid December export growth easing to a six-month low of 3.49 per cent.

It closed at 20,758.49 with a rise of 45.12 points or 0.22 per cent. Infosys, ITC and TCS led nine Sensex gainers higher while ICICI Bank, L&T and SBI dragged down the 19 losers. BHEL and Tata Motors closed unchanged.

On a weekly basis, the Sensex fell by 93 points and logged the second straight drop.

The 50-issue NSE CNX Nifty also moved in a wide range of nearly 100 points before finishing up by a mere 3.10 points, or 0.05 per cent, at 6,171.45 today. Also, SX40 index of MCX-SX ended 56.51 points up at 12,423.34.

Jignesh Chaudhary, Head of Research, Veracity Broking Services said: "Indian markets finally eroded over half of gains, after trading strong the better part of the day. This positive mood was uplifted by a good start to results season with Infosys. Sensex finally ended the day on a flattish note as investors started tracking the IIP number due later today and inflation scheduled to be released on Monday."

Second-line stocks continued to attract profit-booking by retail investors. The BSE Midcap and Smallcap indices closed down by 0.94 per cent and 0.62 per cent respectively.

Key benchmark indices in Hong Kong, Japan and Taiwan inched up in 0.17-0.26 per cent range while equity barometers in China, Singapore and South Korea eased.

European stock markets were trading higher. Key indices in France, Germany and UK moved up by upto 0.57 per cent.

Coming back to the local market, besides Infosys, major Sensex gainers were Wipro 2.55 per cent, ITC 2.22 per cent, TCS 1.70 per cent, Dr Reddy's Lab 1.47 per cent, ONGC 1.25 per cent and Reliance Industries 0.75 per cent.

"Infosys Q3FY14 results were better than estimates and the IT sector was positive. However, post Q3 results from Indusind Bank, concerns rose on the asset quality performance, and heavy selling was seen in the banking stocks," said Rakesh Goyal, Senior Vice President, Bonanza Portfolio.