The seeds of the partnership between Waymo and Lyft were planted in discussions last summer, the two people familiar with the deal said. The talks involved Logan Green and John Zimmer, the founders and leaders of Lyft, and John Krafcik, the chief executive of Waymo. The idea of a deal evolved as the executives visited each other’s campuses in the ensuing months.

The partnership indicates that Waymo believes its self-driving-car technology has moved past the research stage and is ready to be applied commercially. Alphabet, Google’s parent company, spun Waymo out of Google’s X project lab in December after more than eight years of research. The vehicles have been tested on closed tracks and open roads in Arizona, California, Texas and Washington, where state law allows the testing of autonomous vehicles. Waymo has said the vehicles have logged more than three million miles of real-world testing.

For Lyft, which has said it has no plans to develop its own self-driving-car technology, the deal with Waymo offers another way into the market. While Lyft has said it will work with G.M. on testing autonomous vehicles, G.M. bought the self-driving-technology start-up Cruise Automation last year for more than $1 billion in cash and stock. Cruise has begun testing G.M. vehicles on the open road in California.

In April, Lyft said it had raised $600 million in new venture capital, an investment round that valued the company at $6.9 billion.

Uber did not immediately respond to a request for comment.