The market opened positive on overnight earnings numbers of FMCG major Hindustan Unilever coupled with a firming trend in Asia, tracking another record close at Wall Street.

The Sensex after a gap up opening advanced to hit a high of 31,978.89, before settling at 31,955.35, a gain of 244.36 points, or 0.77 %.

The gauge had retreated from record by plunging 363.79 points in the previous session.

The 50-share NSE Nifty stayed in the positive zone and retook the 9,900-mark to hit a high of 9,905.05 as buying paced up towards the fag end. It settled higher by 72.45 points, or 0.74 %, at 9,899.60.

“Pharma sector outperformed followed by a series of US FDA approvals, which offered bargaining opportunity to investors. Trump’s failure to repeal Obamacare and a strengthening rupee will keep the outlook intact,” said Vinod Nair, Head of Research, Geojit Financial Services.

Coal India, TCS, Sun Pharma and Kotak Bank also contributed to the upmove, rising by up to 2.66 %.

Shares of state-owned HPCL, Indian Oil Corporation, BPCL and ONGC buzzed with activity, largely on the back of merger talks, which recorded a rise of up to 4.14 %.