A sharp downward correction in Chinese stocks and uncertainties involving Greece kept Indian markets on edge, which ended the week in the red.

The global weakness meant benchmark indices Sensex and Nifty settled below the psychologically significant 28,000 and 8,400 respectively, reversing three weeks of gains.

The 30-share Sensex traded between 28,335.23 and 27,530.90 during the week before ending at 27,661.40, a fall of 431.39 points, or 1.54 per cent, over the previous week.

The gauge had rallied a whopping 1,667.49 points, or 6.31 per cent, in the past three weeks.

Nifty too lost 124.35 points, or 1.47 per cent, to close at 8,360.55. It had gained 502 points, or 6.29 per cent, in the same period.

The trading sentiment remained volatile as investors took a cautious line ahead of the quarterly numbers and the announcement of key macro data points like IIP. Conflicting reports over monsoon only muddied the waters.

Though the markets recovered from the initial blow of Greece rejecting the bailout terms, the sharp sell-off in China pushed investors to the brink.

However, what cushioned the fall was value buying in key frontline stocks supported by short-covering after things started looking up in China, and Greece inched closer to sealing a deal with its creditors.

Though the selling was indiscriminate, BSE IT bore the brunt, falling 4.09 per cent, followed by metal, technology, auto, and oil & gas.

However, capital goods and healthcare staged a smart recovery to end higher by 2.99 per cent and 2.34 per cent, respectively.

BSE-small cap gained marginally while mid-cap closed virtually steady.

The quarterly earnings season kicked off with TCS reporting a lower-than expected 2.1 per cent growth in its net profit at Rs 5,684 crore.

Meanwhile, FIIs turned net buyers after the recent selling spree and bought equities worth Rs 2,174.91 crore during the week, according to provisional data.