India's benchmark Sensex stock index hit a record on Wednesday, while the Nifty 50 logged a new closing high amid sustained foreign inflows into Indian equities backed by the country's strong growth prospects.

The S&P BSE Sensex hit an all-time high at 63,588.31, before giving up some gains to close at 63,523.15.

The Sensex, though up by over 4 per cent so far this year, has still underperformed indexes of countries like Japan, Taiwan, South Korea, Vietnam and Sri Lanka. But, Sensex was the first index to hit a record high this year.

The blue-chip Nifty index rose 0.21 per cent to 18,856.85, a record close.

"After an almost eight-month consolidation, the Sensex has hit an all-time high," said Amar Ambani, head of institutional equities at YES Securities.

"If monsoons do not play spoilsport, 2023 will be a strong year for Indian equities. FPI money should keep flowing into India."

Also read: Textile stocks threading their way to bull party

Foreign investors have poured in ₹73,812 crore so far in this financial year. They were net sellers in the two previous financial years, with a record outflow of ₹1,40,010 crore in FY22.

India's economic growth has accelerated in the March quarter, while inflation has cooled, showing that the country remains one of the fastest-growing emerging economies.

On Wednesday, nine of the 13 major sectoral indexes advanced, with high-weightage financials adding 0.68 per cent.

Broader indexes extended gains with midcaps rising 0.81 per cent and hitting a fresh high and small-cap index advancing to a new 52-week high.

Also read: Gadkari’s cool talk lifts Subros 20 per cent

Among individual stocks, Shriram Finance jumped over 11 per cent and hit a record after Piramal Enterprises sold its entire 8.34 per cent stake in the company.

Markets, meanwhile, waited for US Federal Reserve Chief Jerome Powell's testimony before the financial affairs committee of the US House of Representatives.