The Nifty and the Sensex ended the session marginally in the green amid firm European cues.
The 30-share BSE index Sensex was up 23.65 points (0.12 per cent) at 20,272.91 and the 50-share NSE index Nifty was up 13.5 points (0.22 per cent) at 6,020.95.
On the BSE, auto, metal, IT and healthcare indices gained the most by 1.94 per cent, 0.49 per cent, 0.44 per cent and 0.36 per cent, respectively.
On the other hand, banking, oil & gas and FMCG indices lost investors' support and were down 0.39 per cent, 0.09 per cent and 0.01 per cent, respectively.
Tata Motors, M&M, NTPC, Tata Steel and Maruti were the top five Sensex gainers, while the top five losers were Hindalco, Tata Power, Bajaj Auto, HUL and HDFC Bank.
European stocks were up amid signs that the US lawmakers will agree on a compromise deal to avoid an unprecedented default. Asian markets ended mixed.