Ford Motor Co. said it unloaded more shares of Rivian Automotive Inc., further pressuring the electric-truck maker’s battered stock price.

Ford sold 7 million Rivian shares at a price of $26.88, the company said in a regulatory filing late Friday. That followed an 8-million-share sale earlier in the week at about the same price.

The sale leaves Ford with about 86.9 million shares of Rivian, or a 9.7% stake, according to FactSet data.

Rivian’s stock price sank earlier in the week following news of Ford unloading shares. They rebounded later in the week, after the startup stood by its previously lowered production forecast for 2022 and said it expected supply problems to ease.

This year, Rivian shares have fallen sharply as the company has strained to roll out its first models amid supply-chain bottlenecks. Shares were down 74% through Friday, closing at $26.70.

Ford first invested in Rivian in early 2019, part of a strategic partnership that included plans to co-develop an electric vehicle. That project eventually was scrapped and the companies now compete head-to-head in the fledgling market for electric pickup trucks.

The rise and fall of Rivian’s stock price has had a whipsaw effect on Ford’s bottom line. Ford recorded a paper gain of $8.3 billion last year, after Rivian shares soared following its November IPO. But the stock selloff in recent months was a drag on Ford’s first quarter, erasing $5.4 billion from its bottom line and swinging the company to a quarterly loss.

Ford last month began production of a battery powered F-150 Lightning pickup truck. Rivian began producing the R1T pickup at its factory in Normal, Ill., late last year, and is making an SUV, the R1S, and an commercial delivery van for Amazon.com Inc., which is also a large Rivian shareholder.

Rivian is among a number of EV startups whose valuations soared last year, as investors sought exposure to an expected boom in electric-vehicle sales globally. But many of the young companies have struggled to increase production, stymied by supply-chain problems and the complexities of auto manufacturing.

Write to Mike Colias at Mike.Colias@wsj.com