NEW DELHI, Jan 15 (Reuters) - Net inflows into exchange traded funds (ETFs) tracking Indian stocks hit a record high in 2023, with analysts optimistic that investors will continue to buy into the world's fastest-growing major economy even as keenly watched general elections loom.

India-focused ETFs saw net inflows of $8.6 billion last year, according to data by Morningstar Direct, beating the $7.4 billion peak in net flows in 2021.

Analysts see the trend continuing in the run-up to general elections due by May and beyond, with Prime Minister Narendra Modi expected to be re-elected for a rare third term.

"The strong inflows suggest that investors do not see the upcoming election as a political risk," said Tom Bailey, head of ETF Research at HANetf, contrasting India to Taiwan where approaching elections had prompted European investors to pull $91.6 million out of Taiwan-linked ETFs in 2023.

Argentina also saw sharp fund outflows in the run-up to presidential elections as investors braced for heightened political volatility.

Indian shares, on the other hand, are at all-time highs and foreign portfolio investors made record monthly purchases of equities in December after Modi's Bharatiya Janata Party (BJP) wrested control of key states from the opposition, adding to hopes of political continuity.

"We'd put strong inflows down to the broader growing optimism surrounding India's economic progress and importance than simply the election," Bailey said.

India forecast annual growth of 7.3% in the fiscal year ending in March, the highest rate of any of the major global economies.

Investors are looking at India to diversify their emerging markets portfolio amid worries about economic growth in China and Sino-U.S. tensions, analysts said.

"With China's growth rate slowing, India will increasingly attract more attention," Sammy Suzuki, head of emerging markets at AllianceBernstein, said.

India's NSE Nifty 50 index surged 20% in 2023, compared with a 7% rise in the MSCI emerging markets stocks index and an 11.4% slide in China's blue-chip CSI300 Index.

Inflows into India ETFs last year made up a third of total buys into emerging market funds, Morningstar's data showed.

Suzuki, however, cautioned about India's high valuations, recommending investors select companies that can outperform expectations in order to be successful.

Inflows into U.S.-listed ETFs focused on India made up more than half of the global India-focused fund flows in 2023, with the $2 billion WisdomTree India Earnings ETF and the $7.9 billion iShares MSCI India ETF dominating buys.

ETFs allow for easy access to Indian markets for foreign investors compared with direct investments into equities in India, where it takes 9 months for a foreign investor to open up local accounts, said Malcolm Dorson, head of emerging markets strategy at ETF provider Global X.

"2024 brings an election year, which many see as a tailwind for Indian equities both in terms of spending, but also regarding a promise of economic policy continuity for years to come," Dorson added.

(Reporting by Bansari Mayur Kamdar in New Delhi; Editing by Mrigank Dhaniwala)