The Sensex rose over 26 points to close at 36,265 level, powered by a rally in IT bellwether TCS following better-than-expected quarterly results.
The TCS stock rallied 5.47 per cent to its lifetime high of Rs 1,979.60, a day after the country's largest software exporter posted a 23.4 per cent rise in consolidated net profit for the June quarter.
The stock also hit its all time high of 1995 level on BSE.
TCS, Bajaj Auto and HUL were the top Sensex gainers.
Extending its winning run for the fourth day, the 30-share barometer, after opening on a strong footing on optimistic buying by participants, gathered momentum to touch a high of 36,362.
However, it shed some ground on profit-booking and slipped to touch a low of 36,169, before finally finishing at 36,265, up by 26.31 points, or 0.07 per cent.
The 50-share NSE Nifty too closed at 10,948, up just 1.05 points, or 0.01 per cent, after moving between 10,976 and 10,923.
Meanwhile, domestic institutional investors (DIIs) net bought equities to the tune of Rs 293.96 crore, while foreign portfolio investors (FPIs) sold shares worth Rs 20.73 crore on Tuesday , provisional data showed.
Market breadth was negative 1045 stocks closing higher compared with 1581 ending in the red on BSE.