The indices were on their toes ahead of release of the growth numbers slated for post-market hours on Thursday.
Since it was the last day for August derivatives contracts, speculators went about covering their short bets in the last lap, which kept the positivity going.
"Market was range bound while short covering emerged towards the close on account of expiry which took the indices to positive. Investors are a little cautious ahead of Q1 GDP data later today. On the other hand, ease in geopolitical tensions will give some relief to the market," said Vinod Nair, Head of Research, Geojit Financial Services.
The 50-share NSE Nifty ended at 9,917.90, up 33.50 points -- 0.34 per cent -- after shuttling between 9,925.10 and 9,856.95.
More From This Section
Realty, power, oil and gas stocks took the front row. The BSE realty index advanced the most by 1.11 cent, followed by power, consumer durables and oil and gas.
Healthcare, banking and metal came as speed bumps, ending in the negative.
Wipro got top billing surging 2.54 per cent followed by Bajaj Auto that rose 2.24 per cent. Reliance Industries, Maruti Suzuki, Cipla and Asian Paints registered gains of up to 1.88 per cent.
Participants rolled over their futures and options contracts from August series to September, causing deep swings in the market.
Domestic institutional investors (DIIs) remained steadfast in their backing by lapping up shares worth Rs 15,695.51 crore while foreign portfolio investors sold shares of Rs 16,073.21 crore as on August 30.
Broader markets kept getting higher, with BSE small and mid-cap indices turning green.