DETROIT (Reuters) - China's Tencent Holdings Ltd 0700.HK has bought a 5 percent stake in U.S. electric car maker Tesla Inc TSLA.O for $1.78 billion, the latest investment by a Chinese internet company in the potentially lucrative market for self-driving vehicles and related services.

Tencent's investment, revealed in a U.S. regulatory filing, provides Tesla with a deep-pocketed ally as it prepares to launch its mass-market Model 3. Tesla's shares rose 2.7 percent to $277.45 on Tuesday, closing in on Ford Motor Co F.N as the second-most-valuable U.S. auto company behind General Motors Co GM.N.

MORE STORIES FROM REUTERS

Trump applauds Ford's previously planned investment in Michigan plants

Black Tesla worker says he faced racist taunts, violent threats

German environmental lobby sues motor authority over VW scandal

Tencent also could help the U.S. company sell - or even build - cars in China, the world’s largest auto market, analysts said.

“It certainly is a strong chess move for Tesla,” said Jeff Schuster, senior vice president of forecasting for researcher LMC Automotive, citing the cash infusion and “help in navigating the Chinese market.”

Tesla Chief Executive Officer Elon Musk on Tuesday tweeted: “Glad to have Tencent as an investor and adviser to Tesla.” Musk did not say what he meant by “adviser” but in a separate tweet he noted Tesla had “very few” Model 3 orders from China, where the car has not been formally introduced.

Slideshow ( 3 images )

The midsize Model 3 is due to go on sale later this year in the United States.

The deal expands Tencent’s presence in an emerging investment sector that includes self-driving electric cars, which could enable such new modes of transportation as automated ride-sharing and delivery services, as well as ancillary services ranging from infotainment to e-commerce.

Those new technologies, and their potential to create new business models and revenue streams in the global transportation sector, have attracted billions in investment from China's three tech giants - Tencent, Alibaba Group Holding Ltd BABA.N and Baidu Inc BIDU.O.

In an investor note, Morgan Stanley auto analyst Adam Jonas said on Tuesday that he “would not be surprised” to see Tencent and Tesla collaborate in the development and deployment of some of those technologies.

The White House did not immediately respond to a request for comment on the Chinese investment in Tesla, but President Donald Trump has been critical of U.S. automakers and of China trade policies.

Founded in 1998 by entrepreneur Ma Huateng, Tencent is one of Asia’s largest tech companies, best known for its WeChat mobile messaging app. With a market capitalization of about $275 billion, it is roughly six times the size of 14-year-old Tesla, whose $45 billion market cap on Tuesday was only $1 billion shy of 114-year-old Ford.

Tencent was an early investor in NextEV, a Shanghai-based electric vehicle startup that since has rebranded itself as Nio, with U.S. headquarters in San Jose, not far from Tesla’s Palo Alto base. Tencent also has funded at least two other Chinese EV startups, including Future Mobility in Shenzhen.

In addition, Tencent has invested in Didi Chuxing, the world’s second-largest ride services company behind Uber, and in Lyft, Uber’s chief U.S. rival.

Slideshow ( 3 images )

Baidu has invested in Nio, as well as in Uber and Velodyne, a California maker of laser-based lidar sensors for self-driving cars. Alibaba’s mobility investments include Didi and Lyft.

As Tesla is doing, many of the start-up companies backed by Tencent, Baidu and Alibaba are developing self-driving systems that eventually could be introduced in commercial ride-sharing fleets in the United States and China after 2020.

Tencent maintains a U.S. office in Palo Alto, in the heart of California’s Silicon Valley. Beijing-based Baidu and Hangzhou-based Alibaba also maintain offices in Silicon Valley.

Tencent owns about 8.2 million shares in Tesla, the carmaker said. It is the fifth-largest shareholder, behind Musk and investment companies Fidelity, Baillie Gifford and T. Rowe Price.(bit.ly/2nvNeMI)

To help fund Model 3 production, Tesla raised about $1.2 billion by selling common shares and convertible debt earlier this month. Tencent said its shares were acquired as part of the early March equity sale and on the open market.

Musk had a stake of about 21 percent as of Dec. 31.