Benchmark indices Sensex and Nifty gave up early gains to close in negative territory on Thursday dragged down by IT and pharma stocks, which fell amid fears of a global recession.

The 30-share Sensex opened higher and rose further to touch a day's high of 60,676.12 on gains in auto and capital goods shares. However, it gave up all early gains and later closed 412.96 points or 0.68 per cent lower at 59,934.01. The barometer fell 481.22 points or 0.79 per cent to a low of 59,865.75 during the session.

The Nifty dipped 126.35 points or 0.7 per cent to settle at 17,877.40.

From the Sensex pack, Tech Mahindra, Infosys, Tata Steel, Bajaj Finserv, Axis Bank and Indusind Bank were among the major laggards.

Maruti, Power Grid, NTPC, HDFC, Bharti Airtel, Larsen & Toubro and State Bank of India ended higher.

"Defying the positive trend of global markets, domestic indices shed their early gains, dragged by losses in IT and pharma sectors, while mid and small caps outperformed. Fears of a recession in the global economy exacerbated selling pressure in IT and pharma stocks," said Vinod Nair, Head of Research at Geojit Financial Services.

Globally, in light of inflation in the US, investors are on an edge, assessing the possibility of a higher magnitude of a rate hike in the next Fed policy meeting, he added.

Meanwhile, the international oil benchmark Brent crude dipped 0.04 per cent to $94.06 per barrel.

Foreign institutional investors offloaded ₹1,397.51 crore from the domestic equities on Wednesday.