The Sensex and Nifty closed slightly higher on Thursday after posting their worst fall in nearly seven weeks in the previous session, as continued heavy buying by foreign investors helped lift blue chips such as ITC Ltd even though the overall sentiment remained cautious.

Investors remained wary ahead of June IIP and retail inflation data for July to be released tomorrow.

The broader NSE index closed up 16.85 points or 0.2 per cent at 8,592.15, after falling as much as 0.41 per cent earlier in the day.

The benchmark BSE index ended 84.72 points or 0.31 per cent higher at 27,859.60, after declining as much as 0.28 per cent earlier in the session.

Among BSE sectoral indices, FMCG index gained the most by 1.44 per cent, oil & gas 0.74 per cent, power 0.38 per cent and infrastructure 0.28 per cent. On the other hand, realty index was down 0.9 per cent, metal 0.68 per cent, auto 0.45 per cent and PSU 0.27 per cent.

Top five Sensex gainers were Lupin (+2.27%), ITC (+1.82%), ICICI Bank (+1.27%), TCS (+1.14%) and Asian Paints (+1.12%), while the major losers were State Bank of India (-1.97%), Adani Ports (-1.91%), M&M (-1.88%), GAIL (-1.07%) and Sun Pharma (-1.03%).

Shares of cigarette maker ITC rose 2.1 per cent after falling 2.4 per cent in the previous three sessions, while Reliance Industries gained 1 per cent after closing 2.6 per cent lower on Wednesday.

Asian shares

Asian shares reversed recent gains following a drop in oil prices on a surprising jump in US government stockpiles and record Saudi Arabian production.

Meanwhile, April-June earnings have mostly missed consensus estimates, but foreign investors have remained strong buyers, with Tuesday marking their 23rd consecutive session of purchases, bringing the total net investments in the year to $5.25 billion.

“Obviously there are valuation worries, but there is a lot of liquidity which is keeping the market afloat,” said Daljeet Kohli, director and head of research at IndiaNivesh Securities.

Broader earnings have mostly missed estimates, so the full-year target has to come down, he added.

A report by IFA Global said: "Asian stock markets are on a negative note, with Hang Seng index marginally lower by 1 points and Nikkei index is trading lower by 29 points following weak global cues. US stock markets closed in the red, the Dow Jones Industrial Average closed lower by 37 points and Nasdaq index closed lower by 20 points. US equities closed lower after global crude prices dropped for second successive session on worries over supply glut. European stock markets closed almost flat, with FTSE closing marginally higher by 15 points and CAC closing lower by 16 points, European indices almost flat primarily on back of profit booking as participants started to take profits off the table."