The Sensex, which shuttled between 14,764.35 and 14,469.69, ended with a gain of 13.02 points at 14,658.49 as realty and metal stocks rose on government plans to pump in more money to improve infrastructure, while auto stocks fell on hikes in petrol and diesel prices.
In a similar fashion, the 50-share National Stock Exchange index Nifty closed 7.95 points higher at 4,348.85, after touching the day's high of 4,383.65 and a low of 4,288.75 points.
Brokers said investors adopted a cautious approach to the market and waited for the general Budget on Monday.
The hike in fuel prices spoiled the party in the automobile sector as leading car and truck makers closed lower despite their better quarterly financial performances.
The Economic Survey recommended phasing out all forms cess and surcharges on taxes, securities transaction tax, and fringe benefit tax, and introducing an income-tax code.
A weak opening in European markets also weighed on the bourses.
The metal sector index gained the most, 3.26 per cent, to 11,243.85, followed by PSUs, 1.95 per cent, to 8,156.03.
The realty sector index rose 1.55 per cent to 3,395.18, healthcare 0.84 per cent to 3,590.24, consumer durables 0.44 per cent to 2,966.79, oil and gas 0.12 per cent to 9,506.02 and power 0.28 per cent by 2,877.19.
However, the capital goods index fell 1.01 per cent to 12,770.31, auto 0.91 per cent to 4,573.98, banks 0.52 per cent to 8,278.07, teck 0.58 per cent to 2,628.73 and FMCG 0.08 per cent to 2,280.54.