Benchmark indices ticked higher for the fifth straight session on Thursday, buoyed by fag-end buying in IT stocks despite a largely downbeat trend overseas.
A recovery in the rupee also boosted investor confidence.
After swinging between gains and losses throughout the session, the 30-share BSE Sensex saw robust buying towards the fag-end to close 95.71 points or 0.16 per cent higher at 59,202.90.
Similarly, the broader NSE Nifty climbed 51.70 points or 0.30 per cent to 17,563.95.
HCL Technologies topped the Sensex gainers' chart, spurting 2.22 per cent, followed by Tech Mahindra, NTPC, PowerGrid, Bajaj Finserv, Nestle India, Bharti Airtel, TCS and Infosys.
However, IndusInd Bank, Asian Paints, UltraTech Cement, HDFC Bank, Titan and Axis Bank were among the prominent laggards, dropping as much as 4.71 per cent.
The market breadth was in favour of the bulls, with 18 of the 30 Sensex components closing in the green.
"Despite global headwinds, sentiments were positive ahead of Diwali festival and healthy earnings so far. Nifty has found support above 17,400 zones for the 3rd consecutive day indicating strong base formation.
"We expect the strength in the market to continue in the near term. Stock specific action would continue as companies keep announcing results," said Siddhartha Khemka, Head - Retail Research, Motilal Oswal Financial Services Ltd.
Ajit Mishra, VP - Research, Religare Broking Ltd, said markets are digesting the recent gains and the tone is still positive, thanks to noticeable buying interest on every dip.
"However, we're seeing limited participation across sectors so the focus should remain on stock selection. Needless to say, further recovery in the global indices, especially the US, would strengthen the trend and help the Nifty to inch toward the 17,800 levels," he noted.
In the broader market, the BSE midcap gauge fell 0.30 per cent and the smallcap index ended marginally lower by 0.01 per cent.
Among the BSE sectoral indices, oil & gas climbed 1.69 per cent, followed by utilities (1.66 per cent), power (1.50 per cent), energy (1.39 per cent), IT (1.20 per cent) and teck (1.19 per cent).
Services, bankex, capital goods, consumer durables, industrials and financial services posted losses.
World stocks were largely negative ahead of a slew of central bank meetings. Among other Asian markets, Seoul, Tokyo, Shanghai and Hong Kong ended lower.
Stock exchanges in Europe were trading on a mixed note in mid-session deals. Wall Street had ended in the negative territory on Wednesday.
International oil benchmark Brent crude was trading 1.16 per cent higher at USD 93.48 per barrel.
The rupee rebounded from its lifetime lows to close 25 paise higher at 82.75 (provisional) against the US dollar.
Foreign institutional investors (FIIs) were net sellers in the capital market on Wednesday as they offloaded shares worth Rs 453.91 crore, as per exchange data.