Uncovering and explaining how our digital world is changing — and changing us.

Tencent, owner of the massive Chinese messaging app WeChat, has bought a 5 percent stake in Tesla, according to a filing published Tuesday. The company paid $1.8 billion for the stake, about 8.2 million shares.

China is an important market for Tesla. In fact, CEO Elon Musk expects China to be one of its biggest markets in the future. The carmaker’s China sales tripled to more than $1 billion last year, accounting for 15 percent of its annual $7 billion in revenue.

This is Tencent’s second major U.S. investment after Snap (formerly known as Snapchat). But it’s also the second electric vehicle manufacturer in which Tencent has acquired a stake. It led an $86 million round in Nio, previously known as NextEV, along with Baidu earlier this month.

Tencent is also an investor in China’s leading ride-hailing service Didi Chuxing. Didi, which acquired Uber’s China assets late last year, recently opened up its own artificial intelligence lab in Mountain View, Calif., where the company will be working on intelligent driving systems, among other projects.

So that means, like Tesla, Didi is working on self-driving cars. That doesn’t mean the companies will necessarily compete in the short term. On the contrary, there may be an opportunity for the companies to collaborate in some way.

As part of Musk’s second master plan, Tesla may one day operate a network of its self-driving vehicles. Keying into Didi’s existing network or leveraging Didi’s logistics platform may be one way to do that in China.

Sign up for the newsletter Recode Daily Email (required) By signing up, you agree to our Privacy Notice and European users agree to the data transfer policy. Subscribe