Ride-hailing startup Lyft Inc. and Waymo LLC, the driverless-car division of Google parent Alphabet Inc., said they would work together to develop autonomous-vehicle technology, dealing another potential blow to rival Uber Technologies Inc.’s ambitions.

The two companies said Sunday they will collaborate on developing products and technology for autonomous autos. In statements, they declined to elaborate more specifically on the terms of the deal or what the work would entail.

A person familiar with the deal said Lyft will help Waymo expand tests of its self-driving technology through an effective taxi service. The two companies have also discussed Lyft plugging Waymo’s driverless cars into its pool of available taxis so any user could summon them, this person said. The exact nature of how this would work is still unclear.

The New York Times earlier reported on the deal between Lyft and Waymo.

A deal with Lyft may signal Waymo is moving closer to commercializing its vehicles. Waymo has logged more than 3 million miles on city roads since it began working on the technology in 2009, but until this year it had not allowed the public to ride in its vehicles.

That changed in February when Waymo began allowing a select group of families and urban commuters in the Phoenix area to use a mobile app to summon self-driving minivans, similar to the ride-hailing services of Lyft and Uber, but for free—and with software steering the cars instead of humans.

Waymo and Lyft each bring two assets to the agreement: Waymo’s self-driving technology and Lyft’s network of taxis operating in more than 300 cities across the U.S.

The companies also happen to be fierce rivals of Uber. Waymo is in the midst of a legal battle with Uber over driverless cars, alleging the ride-hailing company and a former Google executive stole trade secrets to be used in its development of ​self-driving technology. The judge in the case recently recommended to federal prosecutors the allegations be investigated as a criminal matter and denied Uber’s request it be settled in arbitration. Uber has denied wrongdoing and said it plans to defend itself in court.

Lyft is Uber’s chief ride-hailing rival in the U.S., though it is a distant second in market share and valuation. Lyft is working with General Motors Co. to develop self-driving taxis and has said it is planning tests of the vehicles as soon as this year. GM last year invested $500 million into Lyft, now valued at around $7.5 billion; Uber is valued by investors at nearly $70 billion.​

A General Motors spokesman said the Waymo-Lyft partnership doesn’t affect its relationship with Lyft. “We continue to work with Lyft on various aspects of our business,” the spokesman said.

The various partnerships highlight the urgency in Silicon Valley and the Motor City to quickly deploy self-driving vehicles, which many believe hold the potential to save lives by reducing human error and to cut the cost of transportation. Firms from Ford Motor Co. and Tesla Inc. to Amazon.com Inc. and Apple Inc. are jockeying to get autonomous car technology on the roads with $2 trillion in annual revenue tied to the automotive industry, Deloitte Consulting estimates.

But such technology is years from being fully autonomous, let alone allowable by regulators in the U.S. and abroad.

For Lyft and Uber, the technology could help them improve profits by eliminating one of their biggest expenses: paying drivers. As much as 80% of a fare goes to drivers and the San Francisco ride-hailing firms have to pay hefty cash subsidies to keep or entice drivers on the road.

Uber, for its part, has tested self-driving vehicles with passengers in Pittsburgh, San Francisco and Tempe, Ariz., starting last summer. It tussled with regulators in California after failing to seek proper permitting, though it later succumbed to California’s Department of Motor Vehicles and got a permit.

Waymo has self-driving technology but lacks a transportation network to deploy its vehicles, while “Uber has the network but not the technology,” said Gartner transportation analyst Mike Ramsey. “So combining Lyft with Waymo could be very powerful. If you put yourself in Uber’s position and look at this move, you have to feel this is a significant threat.”

The partnership between Waymo and Lyft appears to be a natural union of two companies with different but complementary assets. It gives Waymo a surefire way to connect with people looking for rides, while it gives Lyft potential access to revolutionary technology that threatens to upend its industry, as well as the cachet of partnering with a Google sister firm.

But their relationship could sour as driverless-car technology advances and Waymo’s ambitions grow. Waymo isn’t content simply licensing its technology to other firms; the company intends to eventually launch its own Waymo-branded products and services, including potentially a network of self-driving taxis, which could become the core of its business.

Corrections & Amplifications

Firms from Ford Motor and Tesla to Amazon.com and Apple are jockeying to get autonomous car technology on the roads with $2 trillion in annual revenue tied to the automotive industry, Deloitte Consulting estimates. An earlier version of this article incorrectly stated the figure as $2 billion. (5/15)

—Mike Colias contributed to this article.

Write to Greg Bensinger at greg.bensinger@wsj.com and Jack Nicas at jack.nicas@wsj.com