Image copyright Getty Images

Chinese tech giant Tencent has spent $1.78bn (£1.4bn) on buying a 5% stake in electric carmaker Tesla.

Tencent, best known for its WeChat mobile app, has been investing in a number of sectors, including gaming, entertainment, cloud computing and online financing.

Tesla said the stake was passive, meaning Tencent would not get a say in how the US firm was run.

Shares in Tesla rose 2.3% in early trading following the announcement.

Tesla's range of electric cars has included the Model S and the Roadster, which was billed as the world's first electric sports car.

The company also specialises in battery storage, and, through its SolarCity subsidiary, residential solar panels.

The firm has been raising capital ahead of the launch of its mass-market Model 3 sedan, and gained about $1.2bn through a bond and share sale earlier in March.

Tencent, one of Asia's largest technology firms, has backed several electric vehicle companies in the past.

It was an early investor in NextEV, a Shanghai-based start-up which since has rebranded itself as Nio and has offices in San Jose, California, close to Tesla's base.

Tencent is now the fifth-largest shareholder in Tesla behind chief executive Elon Musk and investment companies Fidelity, Baillie Gifford and T Rowe Price.

Mr Musk remains the largest shareholder, with a stake of about 21% as of the end of 2016.

A win-win deal? Analysis by Simon Atkinson, Asia Business Reporter

Tencent is no stranger to putting money into US companies. Recent investments have included Snapchat-owner Snap and US Uber-rival Lyft - both of which have tech at their heart.

So its backing of Tesla can be seen as a vote of confidence in Elon Musk and his ambitious plans to produce affordable electric cars, and later fully self-driving vehicles.

More importantly, and perhaps why Tesla's shares jumped on this news, Tencent could conceivably help Tesla make better inroads into the Chinese market.

Last year Tesla's sales in the world's most populous nation topped $1bn - but that is a fraction of what it was turning over in the US.

And if it really is going to make its Model 3 mass market, it needs consumers in places like China to be buying it.

Mr Musk has said he sees Tencent as an "adviser" as well as an investor, and the Chinese giant should have plenty of insight having already invested in businesses that are focusing on the future of transport.

As well as being an early backer of NextEV, it owns a slice of Didi Chuxing, the Chinese ride-sharing giant that effectively muscled Uber out of the market, as well as a stake in HERE, the German consortium owned by BMW, Audi and Daimler.

And recently Tencent Chairman Ma Huateng said he could see his firm getting involved in developing artificial intelligence (AI) technology for driverless cars in the future.