Mumbai, Benchmark Sensex and Nifty closed marginally lower in a range-bound session on Thursday as investors booked gains in heavyweights ahead of the announcement of key financial results for the June quarter.

Retreating from early highs, the 30-share BSE Sensex closed down 27.43 points or 0.03 per cent at 79,897.34. As many as 15 Sensex stocks closed with gains while the rest fell.

The index rose 245.32 points to reach a high of 80,170.09 in early trading, but later lost momentum due to selling in index heavyweights. The barometer reached the day's low of 79,464.38, 460.39 points lower than the last close.

The NSE Nifty fell 8.50 points or 0.03 per cent to settle at 24,315.95. The broader index ranged between a high of 24,402.65 and a low of 24,193.75 in daily trading.

"Major indices are trading in a tight range, struggling to justify their premium valuation ahead of the first quarter earnings season, which is expected to be subdued," said Vinod Nair, head of research at Geojit Financial Services.

Among Sensex stocks, Bajaj Finance fell the most by 1.48 per cent. Mahindra & Mahindra (1.24 per cent), NTPC (1.14 per cent) and Nestle (1.05 per cent) were also among the top losers. HDFC Bank, ICICI Bank, Sun Pharma, Power Grid, UltraTech Cement, Bharti Airtel, RIL and Larsen & Toubro also fell.

On the other hand, the main consumer goods sector, ITC, rose the most at 1.64 percent. Tata Motors, Asian Paints and Titan also won.

TCS gained 0.33 per cent ahead of the release of its quarterly financial results. India's largest IT services company, after market hours, reported an 8.7 per cent year-on-year rise in its consolidated net profit at Rs 12,040 crore in the first quarter ended June 2024. Its Revenue rose 5.4 per cent year-on-year to Rs 62,613 crore for the June quarter.

"After the flat start, the Nifty oscillated in a range and finally settled at 24,315.95 levels. Meanwhile, a mixed trend on the sectoral front kept traders busy, where energy and consumer goods ended in the green , while real estate and pharma closed lower,” Ajit Mishra – Senior Vice President of Research at Religare Broking Ltd said.

In the broader market, the BSE small-cap gauge rose 0.57 per cent and the mid-cap index rose 0.34 per cent.

Analysts said the broader market is showing marginal momentum, led by a change in FII inflow and budget expectations.

"Attention is now focused on the US inflation data, which is estimated to moderate and positively influence the Fed's interest rate decisions," Nair said.

Among the indices, real estate decreased by 1.41 percent, automobiles by 0.43 percent and utilities by 0.19 percent.

Oil and gas increased by 1.68 percent, while energy (1.20 percent), services (1.13 percent), industrial industry (0.31 percent) and telecommunications (0 .24 percent) also advanced.

In Asian markets, Seoul, Tokyo, Shanghai and Hong Kong closed higher. European markets were trading in positive territory. US markets finished significantly higher on Wednesday.

Foreign institutional investors (FIIs) bought shares worth Rs 583.96 crore on Wednesday, according to exchange data.

Global benchmark Brent crude rose 0.21 percent to $85.26 a barrel.