In the self-driving world, the enemy of my enemy is my friend.

On Sunday, the New York Times reported that Lyft and Waymo have agreed to collaborate on self-driving technology. Ride-hailing services are salivating at the prospect of autonomous vehicles, as it will allow them to offer their services without having to deal with human drivers, who need to be paid and also screened for criminal backgrounds.

The deal has been struck while Waymo is in the midst of a legal battle with Lyft's deadliest rival, Uber. Waymo, an Alphabet company that was spun out of Google's self-driving car program, has accused Uber of stealing trade secrets in order to get a leg up on its own autonomous driving program.

This isn't the first such deal that Lyft has entered into. In 2016, General Motors invested $500 million in the company in order to develop driverless vehicles. And in February of this year, we discovered that GM and Lyft plan to deploy thousands of Chevrolet Bolts equipped with self-driving sensor technology. Autonomous vehicles are being enabled by machine learning algorithms, and the more test miles research fleets can cover, the better the cars can drive themselves.

Waymo has also entered into a partnership with another OEM—Fiat Chrysler Automobiles—to develop autonomous vehicles, and it has also been linked to Honda. Details of the Waymo-Lyft deal are scant at present, so it's unknown how it will affect the existing partnerships, but it's interesting that both companies are spreading themselves about as opposed to working exclusively.