The Sensex and the Nifty ended the session marginally in the green due to profit-taking by funds and retail investors amid firm European cues.
The 30-share BSE index Sensex was up 38.72 points (0.18 per cent) at 20,996.53 and the 50-share NSE index was up 18.8 points (0.3 per cent) at 6,259.90.
On the BSE, power and consumer durables gained the most by 2.27 per cent and 1.24 per cent, respectively, followed by capital goods 0.81 per cent and metal 0.63 per cent. Only IT index was down 0.06 per cent.
Tata Power, Coal India, NTPC, Hero MotoCorp and ONGC were the top five Sensex gainers, while the top five losers were HDFC, Hindalco, Bharti Airtel, HUL and HDFC Bank.
European stocks were up ahead of US jobs report due later tonight that will provide a clear idea on the timing of Fed stimulus cuts.
Asian stocks swung between gains and losses as better-than-expected US economic data fuelled speculation that the Federal Reserve will soon taper its $85-billion-a-month bond-buying programme.