But the benchmark index was down by over 5 per cent on-year -- its first annual fall since 2011.
The 30-share index started the day on a higher note before closing up by 157.51 points, or 0.61 per cent, at 26,117.54.
The broad-based NSE Nifty rose 50.10 points, or 0.63 per cent, to end at 7,946.35, after trading between 7,955.55 and 7,891.15.
Covering-up of short positions following expiry of December derivatives series made investors more sure-footed, brokers said.
More From This Section
The carry-forward of positions to the January series and widening of bets at several blue-chips by investors amid hopes of better returns in the new year accelerated the gains.
The Sensex has lost 1,381.88 points, or 5.02 per cent, in 2015, after gaining nearly 30 per cent in the previous year. The index had last recorded a yearly loss in 2011, when it fell 24 per cent.
The net FPI inflows this year have slackened to just about USD 3 billion, as against an average of USD 20 billion in each of the last three years.
HDFC took the lead, up 2.39 per cent, followed by GAIL (2.18 per cent), Coal India (2.06 per cent) and Bharti Airtel (2 per cent).
HDFC Bank, RIL, Maruti Suzuki, TCS, M&M, Tata Steel and ITC too chalked up gains.
The Nifty has dropped 336.35 points, or 4.06 per cent -- also its first on-year drop since 2011. The 50-share index had climbed to its life-time high of 9,119.20 on March 4 and plunged to hit year's low of 7,539.50 on September 8.
For the whole of 2015, the rupee, at 66.15, lost ground against the dollar as it weakened almost 5 per cent.
Provisional data showed that foreign portfolio investors (FPIs) net bought shares worth Rs 152.20 crore yesterday, which added to the level of overall confidence.
BSE small-cap index advanced 0.49 per cent and mid-cap 0.35 per cent.
As many as 20 out of the 30-share Sensex pack ended higher
while 10 lost.
The market breadth turned positive as 1,465 stocks ended higher, 1,163 closed lower, while 283 ruled steady out of a total 2,911 stocks.
The total turnover rose to Rs 2,745.62 crore, from Rs 2,401.24 crore yesterday.
"Market has ended the year with a negative full-year return of 5 per cent, but expectation is bright on the new year," said Vinod Nair, Head-Fundamental Research, Geojit BNP Paribas Financial Services Ltd.