Volkswagen, a German automaker, and Rivian, a California-based maker of electric pickups and SUVs, said Tuesday that they would form a joint venture to develop software and electronics, extending a partnership they announced in June.

Volkswagen said it would increase its investment with Rivian to $5.8 billion from $5 billion, which will include a 50% stake in the joint venture. While short of an acquisition, the new company broadens the alliance with Rivian and could foreshadow similar partnerships between other established carmakers and new companies struggling to become profitable.

“The partnership with Rivian is the next logical step in our software strategy,” Volkswagen CEO Oliver Blume said in a statement.

In June, Volkswagen and Rivian had said they would work together on vehicle software — an area where the German carmaker has struggled. The agreement announced Tuesday goes further by creating an independent company to jointly develop technology for electric vehicles.

The ever-closer association with Volkswagen has helped allay fears that Rivian will run out of money before it becomes profitable. Rivian shares rose 6% in extended trading Tuesday.

Initially the partnership will be focused on developing software for electric vehicles, but could be expanded to include battery modules or other technology, Blume said during a conference call with reporters. Volkswagen will use the technology in many types of vehicles including subcompacts and cars made by its Audi and Porsche divisions, he said.

Though the world’s second-largest carmaker after Toyota, Volkswagen has struggled to make inroads in the United States. Sales of its electric cars here have lagged behind General Motors and Hyundai-Kia. Volkswagen’s share of the electric car market in the United States was just 3.4% in the third quarter, according to Kelley Blue Book.

Rivian’s pickups and SUVs have received positive reviews in the automotive press, but the company is not selling enough of them to make money. Rivian said last week that it lost $1.1 billion in the third quarter, an improvement from the same period in 2023, when it lost $1.4 billion. However, deliveries during the quarter fell to 10,000 vehicles, from 15,600 a year earlier, because of a parts shortage.

The new joint venture will be known as Rivian and VW Group Technology and will be led by Wassym Bensaid of Rivian and Carsten Helbing of Volkswagen. Its headquarters will be in Palo Alto.

Volkswagen’s $5.8 billion investment consists of shares in the joint venture and debt.