SAN FRANCISCO — Fresh from taking a $500 million stake in ride-sharing service Lyft, General Motors has bought assets and hired employees from an Uber competitor that ran out of gas.

GM announced on Tuesday that it snapped up workers and technology from ride-sharing and deliver service Sidecar, revving its drive into a future of autonomous on-demand cars.

“In connection with Sidecar ceasing operations, we can confirm that we have attracted Sidecar employees to be integrated into the GM urban mobility team, and acquired certain related assets, for work on our global mobility programs,” a GM spokesman said. The company declined to disclose any other details.

Sidecar is based in San Francisco and was founded about five years ago, during which time it has competed with Uber and Lyft in the on-demand, ride-sharing market. In December, Sidecar put out word that it was ending its ride-sharing and delivery service in the face of better-funded rivals. That same month, GM announced a $500 million stake in Lyft as part of a “strategic alliance.”

GM will be the preferred provider of cars to Lyft drivers through short-term rental hubs, and allow Lyft drivers and customers to connect through GM’s OnStar information technology services, according to the companies. The two will also jointly develop a network of self-driving vehicles available on-demand for customers.

“We see the future of personal mobility as connected, seamless and autonomous,” GM president Dan Ammann said when the alliance was announced. “With GM and Lyft working together, we believe we can successfully implement this vision more rapidly.”

Lyft vies with industry leader Uber in ride-hailing services that have undercut taxi services in many countries but also allowed many more people access to on-demand transportation without owning their own vehicles.

Ride-sharing services typically let people use smartphone applications to summon cars owned and operated by people who sign on as drivers. GM meanwhile is working on developing autonomous cars.