Two former Apple employees also recalled how their colleagues built a model of a sport-utility vehicle with four seats facing one another, which some employees tested by sitting inside, similar to a design Mercedes advertised in 2015.

As recently as 2016, Apple planned to spend hundreds of millions of dollars to build research and development labs around its Cupertino, Calif., campus, including a machine shop and labs for electric car batteries, according to interviews and documents about the plans viewed by The New York Times.

Members of the car project soon found that even designing and building fundamental parts of a new car was not simple. Apple initially intended to build the car in-house, with preliminary discussions of an Apple automotive plant in the south of the United States, two former employees said. But those plans quickly shifted to finding a manufacturing partner to build — but not design — the cars.

Two former employees said Apple’s requests of partners gradually evolved. At first, the company asked for help building an Apple-designed vehicle. Then, it began asking potential partners to provide foundational car pieces like the chassis and wheels. Eventually, Apple requested that potential partners retrofit their own vehicles with Apple’s sensors and software.

In late 2015, Apple bought two Lexus S.U.V.s and hired a Virginia firm called Torc Robotics to retrofit the vehicles with sensors, a project known internally as Baja, one former employee said. The fleet has grown, and California regulators have authorized Apple to use 55 such S.U.V.s to run self-driving tests on public roads, the most of any company in the state after General Motors — but still fewer than Waymo has across six states.

But Apple did not partner with Lexus, and it has long sought a formal partner. The company first worked with Magna Steyr, a Canadian-Austrian contract manufacturer that has produced low-volume vehicles for other automakers, like the Mercedes G-Wagen, according to two former employees. A few dozen Magna Steyr employees joined Apple’s car team in California but gradually left after the partnership ended.

BMW was long Apple’s top choice, given its focus on high-end but mainstream products, former employees said. Many Apple executives, including the company’s chief executive, Timothy D. Cook, also drive BMWs. Mr. Cook visited BMW as early as 2014 to discuss a partnership, and those on-and-off negotiations continued for years. But a person close to the talks said any deal now appeared dead because both Apple and BMW wanted to own the customer experience and relationship.