The 30-share Sensex, which gained nearly 100 points at the outset, fell back to register a loss of 91.15 points at 17,287.31.
The key index moved between 17,480.74 and 17,241.88 points during the day.
The wide-based National Stock Exchange index Nifty fell by 29.60 points at 5,165.90 after touching day's high of 5,230.75 and a low of 5,155.85 points.
Brokers said markets surrendered its early gains as investors thought selling would be prudent ahead of a holiday tomorrow on account of 'Maharashtra Day'.
They said software companies, led by Infosys, continued gains after the government extended an industry tax break for one more year.
The price movement was restricted as most of the market participants adopted a cautious approach ahead of a US Federal Reserve meeting on interest rate cut.
Oil and gas index fell the most by 155.47 points at 11,505.79, followed by banking index by 145.07 points at 8,819.68.
Realty index fell by 144.75 points at 8,505.49, metal index by 78,87 points at 16,114.40, consumer durable index by 42.86 points at 4543.11.
However, stocks in IT, auto, PSU, FMCG and healthcare remained in demand and gained substantial ground to save the Sensex from any major fall.