General Motors Co. will pay $120 million to state attorneys general to settle allegations the automaker concealed an ignition-switch defect.

The settlement, announced Thursday, comes three years after GM issued recalls for more than 9 million vehicles in the U.S. for a defect that could cause cars to suddenly lose electrical systems, including power steering and power brakes. In some situations, air bags failed to deploy in a collision.