As it plunged toward bankruptcy in 2009,
Now, with the auto industry speeding toward a point where cars drive themselves, the automaker is trying to get ahead of the curve.
On Friday, GM said it acquired Cruise Automation, a 40-person software company in San Francisco that has been developing autonomous-vehicle technology.
GM plans to use Cruise technology to gave autonomous capability to its vehicles, though probably not in existing models.
The company has not yet announced when Cruise's technology will be integrated into GM vehicles, only that it will be “as soon as possible,” said Kevin Kelly, a GM spokesman.
The deal marks Detroit's latest foray into Silicon Valley.
Also Friday, Ford Motor Co. announced the creation of Ford Smart Mobility, a subsidiary focused on designing, building and investing in such things as connected vehicles and autonomous technology.
Two months ago, GM bought the assets of Sidecar Technologies Inc., a San Francisco ride-hailing company, and invested $500 million in the ride-sharing service Lyft. GM and Lyft plan to collaborate on a service that will allow users to reserve a self-driving car.
Founded in 2013, Cruise Automation is best known for its software that gave autopilot capabilities to conventional cars, said Kyle Vogt, company founder and chief executive. About a year and a half ago, the company switched its focus to fully driverless technology.
Cruise said it is one of the few firms that has a permit from the California Department of Motor Vehicles to test self-driving vehicles on public roads.
"We share a common vision with GM for how autonomous vehicles will change the world," Vogt said. "We were already on that path, and we remain on the path."
Financial terms of the deal were not disclosed, and Vogt and Kelly said they would not comment on "speculation" about the price tag. ReCode and Fortune quoted anonymous sources as saying the price was at least $1 billion.
GM said Cruise would continue to operate in San Francisco, but would function as an independent unit within the automaker's newly formed autonomous-vehicle development team.