A correction to an earlier version of this article has been appended to the end of the article.

SAN FRANCISCO — Lyft on Friday said it will develop its own autonomous driving technology and open a laboratory in Palo Alto to help build the hardware and software.

Lyft’s plan to build in-house self-driving technology is a pivot from its strategy of primarily focusing on building partnerships with car manufacturers, like General Motors and Jaguar Land Rover, or self-driving car startups like nuTonomy.

The move comes as its main competitor, ride-hailing giant Uber, runs rudderless after its founder Travis Kalanick resigned last month following a chain of scandals. Uber began testing self-driving cars last year.

In a press-only event in its San Francisco headquarters, Lyft executives said itremainscommitted to its partnerships while working on its own self-driving technology.

“I don’t think this is a zero-sum game,” said Taggart Matthiesen, Lyft’s senior director of product. “It is so early in this industry right now.”

Lyft’s first major step in building its own technology will be the upcoming laboratory in Palo Alto, dubbed Level 5. Lyft says it will employ several hundred people in the newly created division by the end of 2018. The lab is expected to open “in a few weeks,” the company said.

“This is an unique time for Lyft to take the lead,” said Raj Kapoor, Lyft’s chief strategy officer. “Level 5 is the ultimate level in building autonomous vehicles. It’s going to be a center that’s going to open to working with partners.”

For both Uber and Lyft, self-driving cars are a frontier crucial to their success. The ride-hailing rivals have lost enormous amounts of money every year due to them subsidizing discounts for riders and bonuses for drivers. Lyft in 2016 lost $600 million despite a 250 percent jump in revenue; Uber lost $3 billion in the same year, according to Bloomberg.

Both hope to cut losses by replacing human drivers with autonomous vehicles. But on Thursday, Lyft preached a hybrid system where human drivers will take over self-driving cars for locations and situations deemed too chaotic and difficult for machines.

“The hard reality is that every street, every route is not the same,” said Matthiesen. “If there is rain or a Giants game happening nearby, that’s not an ideal situation for autonomous vehicles early on.”

Lyft’s focus on finding a balance was also apparent with how it was going to work with its partners. Lyft said it was sharing its application codes with its smart car-building partners so that they can plug Lyft into their future car models.

And Lyft said that if its in-house self-driving technology reaches maturity, it will rely on the automobile industry to build a car rather than building one themselves.

“Lyft is not getting into the business of manufacturing a car,” said Kapoor. “This isn’t about bring one car, two cars or 100 cars to San Francisco. The auto industry has done a fantastic job in safety and reliability for many many years, and we respect that.”

Correction: July 27, 2017

An earlier version of this article incorrectly misspelled the name of Taggart Matthiesen, Lyft’s senior director of product.

Seung covers Apple and personal technology for the Bay Area News Group. He was previously a technology reporter for Newsweek and a weekly columnist for the San Francisco Examiner. Seung grew up in Los Angeles and graduated from UC Berkeley.

Sunday July 3, 1983, was an exciting day for me. I picked up a copy of the Los Angeles Times and there, in the business section, was my very first column about personal computers. I remember calling up a friend and telling him I had good news and bad news. The good news was that I just signed-up to write...