Indian shares logged record closing highs on Thursday, amid a global rally after softer-than-expected U.S. inflation data bolstered expectations that the Federal Reserve would cut rates sooner rather than later.

The NSE Nifty 50 settled 0.33% higher at 23,398.90, recording an all-time closing high for the third time in four sessions. The S&P BSE Sensex added 0.27% to finish at an all-time high of 76,810.90.

Both the benchmarks climbed 0.7% in early trade to hit record highs before trimming some gains, in part as state-run banks snapped a six-session post-elections results rally.

U.S. consumer prices were unexpectedly unchanged in May, lifting bets of a rate cut in September to 61% from 53%, according to the CME FedWatch tool.

"Favourable cues from the U.S., including cooling core inflation, has boosted sentiment, powering IT stocks higher," said Sanjeev Hota, vice president and head of research at Sharekhan.

Even the broader, domestically focussed small- and mid- hit all-time highs, joining in the global rally.

That was despite the Fed slashing its forecast to only one rate cut worth 25 basis points this year, from the three it projected in March. The futures market, though, is pricing in 44 bps of cuts.

Seven of the 13 major sectors logged gains. IT companies , which count U.S. as a key revenue geography, jumped 1.03%.

Financials and realty stocks, which are sensitive to domestic interest rates, climbed 0.29% and 2.24%, respectively.

That was after data showed India's retail inflation eased slightly in May, supporting bets for a rate cut in the last quarter of the year.

Among stocks, Larsen & Toubro gained 2% after its hydrocarbon unit won an order for modifications at the Tapti Daman block, off India's west coast, from ONGC.

Paytm gained 6.35% after saying its ticket-booking services for travel and entertainment would be available on Samsung Wallet in India. (Reporting by Kashish Tandon and Bharath Rajeswaran in Bengaluru; Editing by Savio D'Souza and Sonia Cheema)