The 50-share Nifty hovered between a high of 6,017 and a low of 5,986.55 before finishing at 6,009.50, a gain of 16.25 points, or 0.27 per cent.
Against the backdrop of overnight euphoria sparked off by US budget truce, the trading commenced on a strong note following firm buying in heavyweight counters.
But the market encountered profit-taking at higher levels and fell back to trade in negative zone for a while before rebounding and closing with modest gains.
Global financial markets surged yesterday on the back of a relief rally in response to the US budget deal.
The benchmark mostly traded in a range throughout the session in the absence of any follow-up buying activity and closed above the 6,000 level for the first time in two years.
However, strong buying activities were witnessed in second line counters due to stretched valuations in frontline scrips after the recent rally.
More From This Section
Technology stocks attracted good buying interest on expectations of better Q3 earnings along with oil and gas, metal and infra stocks. FMCG, financials and auto counters saw modest profit-taking.
Globally, Asian bourses closed marginally higher amid growing uncertainty over how the US will tackle further budgetary cuts.
Cairn, Dr Reddy's, Bharti Airtel, ONGC, Infosys, TCS, Reliance, Power Grid, IDFC and DLF were the top Nifty gainers.
The laggards included Tata Power, PNB, Lupin, Sun Pharma, HeroMoto, Maruti, L&T, UltraTech, ITC and Cipla.
Turnover in cash segment rose to Rs 12,461.51 crore from Rs 11,918.71 crore yesterday. A total of 7,989.51 lakh shares changed hands in 60,76,548 trades. The market capitalisation stood at Rs 69,05,260 crore.