Covering-up of short positions by speculators added to the gains, traders said.
Sentiment took a turn for the better after Asian and European stocks rose across the board following a strong close on Wall Street overnight as investors covered up losses following last week's deadly Paris terror attacks.
Participants, however, remained cautious in view of muted September earnings by several blue-chip companies while foreign institutional investors (FIIs) have been net sellers so far this month.
The gauge had gained 149.57 points in the previous session.
More From This Section
The 50-share NSE Nifty closed at 7,837.55, up 30.95 points, or 0.40 per cent. Intra-day, it hovered between 7,860.45 and 7,793.
GAIL was among the stars as it closed up 4.04 per cent at Rs 306.55, followed by ITC (2.91 per cent) at Rs 348.15.
The country's biggest private lender, ICICI Bank, after rising over 2 per cent ended 0.06 per cent higher after the company said it will sell 6 per cent stake in its life insurance arm, ICICI Prudential Life, for Rs 1,950 crore.
Among the 30-Sensex constituents, 20 stocks ended with gains while 10 led by Infosys, Dr Reddy's, Axis Bank, Hero MotoCorp, Bajaj Auto, RIL, Lupin and L&T fell.
Sector-wise, BSE FMCG index gained most by rising 2.17 per cent, followed by metal (1.03 per cent), healthcare (0.79 per cent), auto (0.55 per cent) and power (0.34 per cent).
The broader markets too displayed a firm trend as investors strengthened their bets as the BSE small-cap index rose 0.47 per cent and mid-cap gained 0.31 per cent.
In the sugar segment, Shree Renuka Sugars, EID Parry, Bajaj Hindusthan and Mawana Sugar soared up to 19.24 per cent.
Meanwhile, foreign investors sold shares worth Rs 1,051.26 crore yesterday, as per provisional data.