General Motors Inc. and Lyft Inc. on Monday set out plans to develop an on-demand network of self-driving cars as the U.S. No. 1 automaker announced it would put $500 million into the ride-sharing service¡¯s latest $1 billion fundraising round.

The Detroit-Silicon Valley crossover deal comes as automakers are working out how to respond to the rush of technology companies such as Apple, Alphabet and Uber ¡ª Lyft¡¯s biggest rival ¡ª to control cars of the future and likely reshape the global automotive industry.

The two companies said the partnership, which includes one of GM¡¯s largest investments in another company, stemmed from the shared view that self-driving cars will first reach consumers as part of a ride-sharing service, rather than vehicles owned by drivers.