The blue-chip NSE Nifty 50 index closed down 0.33% at 17,076.25, after scaling an all-time peak of 17,225.75 earlier in the session. The benchmark S&P BSE Sensex settled down 0.37% at 57,338.21 after rising as high as 57,918.71.

The Nifty snapped seven sessions of gains on Wednesday, and both indexes had scaled record highs in the last three days in a market flush with liquidity and solid global cues.

"Since the market has touched record highs and valuation seems to be high, we are seeing an organic profit booking, which is probably pushing the market down," said Gaurav Garg, head of research at CapitalVia Global Research.

The Indian economy rebounded in the April-June quarter even as a devastating second COVID-19 wave swept the country, data on Tuesday showed.

The benchmark 10-year bond yield was down 1 basis point at 6.21%, while the Indian rupee was slightly weaker at 73.13 against the dollar after touching mid-June highs earlier in the session.

Nifty IT and metal stocks declined the most among sub-indexes, closing down 1.33% and 1.79%, respectively. The metal index posted its third session of losses in the last eight.

Mahindra and Mahindra Ltd was the top loser on the Nifty, closing nearly 3% lower. The car maker's total auto sales for August were at 30,585 vehicles, roughly flat from a year earlier.

Maruti Suzuki India closed down 0.9% after it logged an 8.7% drop in total domestic passenger vehicle sales in August and said volumes were affected due to chip shortage.

Shares of Shoppers Stop Ltd closed 0.5% lower, a day after the retailer sold its Crossword Bookstores at a gross business valuation of 416.2 million rupees ($5.69 million).

(Reporting by Rama Venkat in Bengaluru; Editing by Ramakrishnan M.)

By Rama Venkat