Volkswagen (VW) says it will invest up to $5bn (£3.94bn) in US electric vehicle (EV) maker Rivian.

The deal creates a joint venture that will allow the German car making giant and the Tesla rival to share technology.

Rivian shares jumped by around 50% after the announcement.

The tie-up comes as competition intensifies between EV makers in the face of slowing sales and more companies entering the market.

Under the agreement, VW said it will initially invest $1bn in the electric truck and SUV maker, with another $4bn to be put into the company in the coming years.

Founded in 2009, Rivian has not yet posted a quarterly profit. In the first three months of 2024 the company lost $1.5bn.

VW has come under pressure from rivals like Tesla and China's BYD as it tries to grow its share of the EV market.