Mumbai: In a choppy trade during the week under review, buying in IT, refinery and realty stocks after mid-week helped the benchmark Sensex to wipe out all of its early losses and closed up by nearly 67 points at 16,933.83, extending gains for the third straight week.
The market resumed the week on a bearish note following turmoil on global bourses on enduring euro-zone debt worries. The situation aggravated further on declaration of discouraging industrial growth data, and the Sensex fell over 365 points, or 2.17 percent, on Monday and touched a two-week low of 16,374.68 on the immediate day.
Resurfacing of fears over the euro zone debt crisis, after Chief Economist of European Central Bank (ECB) Juergen Stark stepped down due to policy differences with the bank's leadership, rattled the world stocks since September 9.

Growing doubts over a Greek default and reports that Moody's Investors Service may downgrade France's big banks over their exposure to Greece, also fueled the selling.
Domestic factors like sharp fall in Index of Industrial Production (IIP) to a meager 3.3 percent in July from 9.9 percent in the same month last year on account of poor show mainly by manufacturing and capital goods sectors, further exaggerated the situation.
But the market turned positive after mid-week on buying, mainly in IT stocks, triggered by positive cues from overseas markets despite rise in headline inflation.
The Bombay Stock Exchange 30-share barometer traded in the green for rest of the week and crossed 17K-level to hit a high of 17,122.54 before settling at 16,933.83, up 66.86 points, or 0.40 percent. The broader NSE 50-issue Nifty also fluctuated in a range of 5,143.60 and 4,911.05 before ending the week at 5,084.25, posting a rise of 24.80 points, or 0.49 percent.
IT stocks attracted heavy buying interest on expectations of improved revenues as the rupee fell to two- year low against the US dollar on Wednesday. Indian software companies received about 85 percent revenues from the US and European markets.
Smart bounce back in shares was mainly attributed to reversal of trend in overseas markets after Germany and France said they would stand behind debt-ridden Greece.
The two European heavyweights reaffirmed support for Greece to remain in the euro zone and rejected calls for "orderly insolvency" of the debt-laden nation. This provided some relief to investors and lifted global markets after mid-week.
FIIs, who were net sellers to the tune of Rs 1,158.4 crore on first three days of the week, turned buyers and picked up shares worth Rs 561.96 crore on the last two days, including provisional figure of September 16.
Food inflation eased to 9.47 percent for the week ended on September 3 from 9.55 percent in the previous week, giving hope to investors that the decline will continue and the rate of price rise may remain below double-digit.
Capital goods stocks suffered the most following poor show by manufacturing and the sector. L&T and BHEL tumbled by 4.75 percent and 3.06 percent respectively. Tata Steel 3.61 percent and Hindalco 3.43 percent from metal sector, also closed with losses and capped the Sensex rise.