July 18 (Reuters) - Malaysian equities are on a tear led by builders and suppliers on the back of an AI-driven data centre boom, putting a long-overlooked market back on the radar of global investors.

Malaysia's benchmark KLCI is hovering near three-and-a-half-year highs and up five quarters in a row, its longest streak in 13 years. A year-to-date gain of 12% is by far the biggest in Southeast Asia.

Builder Gamuda and utility conglomerate YTL Power have doubled their stock prices in less than a year. Electricity utility Tenaga Nasional's shares are up 45% since December, and foreign money managers are turning buyers in a bet that the market has much further to run.

A relatively steady currency, a period of stability in government, and a trend for global companies to diversify manufacturing setups beyond China offer further tailwinds.

Analysts see builders, power suppliers and tech companies gaining most from foreign investment into the Southeast Asian country.

"I think Malaysia is definitely a sweet spot at the moment because we offer water, power and the connectivity is there," said Ernest Chew, ASEAN portfolio manager at BNP Paribas Asset Management in Kuala Lumpur, who has been buying Malaysian stocks.

"Operating a data centre is not a new thing to Malaysia ... it's just that now we see a (generative)-AI boom, a data centre boom they basically accelerate (foreign direct investment) ... that's why we see minimal risk."

Foreign direct investment tends to be lumpy but hit 188.4 billion ringgit ($40 billion) last year according to the Malaysian Investment Development Authority, close to the record 208.6 billion drawn in 2021.

Amazon, Google, Microsoft, Nvidia and TikTok-parent ByteDance all plan or have announced data centre projects in Malaysia as they build out the computing power behind artificial intelligence products. Investors see that money coursing through the economy from landlords to banks.

To be sure, foreign flow into equities has not yet materialised. HSBC analysis shows a $150 million net outflow from Malaysian stocks over 2024 to June 26 and both Asia-focused and global emerging market funds are underweight on the country.

But with these sectors driving the momentum and deepening liquidity - average daily turnover is nearly double what it was a year ago - there is growing confidence from foreign investors about the market's outlook.

"Investors are warming up to Malaysia," said Tushar Mohata, head of Malaysia equity research at Nomura. "We don't think valuations are overheated now, so we think this rally should continue."

One measure of value, the forward price-to-earnings, is 15 for Malaysia's benchmark KLCI against 21 for the S&P 500 and the performance of sub-indexes has been scorching, with the construction index up 63% year-to-date.

Earlier in July, J.P. Morgan upgraded its base case target for the benchmark index to 1,650 points. The index closed at 1,633.54 on Wednesday.

($1 = 4.6710 ringgit)

(Reporting by Sameer Manekar in Singapore; Editing by Tom Westbrook and Jacqueline Wong)