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.

The settlement benefits the attorneys general of 49 states and the District of Columbia. Arizona did not participate.

“The resolution includes a financial component and assures GM will continue ongoing improvements made to ensure the safety of its vehicles,” GM said in a statement. “These improvements include continuation of a new organizational structure devoted to global vehicle safety and the company's Speak Up for Safety program.”

GM previously paid about $2 billion to the Department of Justice, the Federal Trade Commission, consumers and shareholders. That amount includes nearly $600 million placed in a victims' compensation fund overseen by Ken Feinberg. The Detroit company filed for bankruptcy in 2009.

The states claimed GM employees knew as early as 2004 that the ignition switch could be a safety risk. But recalls were delayed for years.

GM agreed as part of the settlement not to tell consumers a vehicle is safe unless it meets federal motor vehicle safety standards. Used vehicles may not be called “safe” or “subject to rigorous inspection” unless there are no open recalls affecting them, the agreement continues.

The settlement also requires GM to instruct dealers to complete recall repairs before making a car eligible for certification or delivering it to a customer.

The GM investigation and negotiation was led by the attorneys general of Connecticut, Florida, Maryland, Michigan, New Jersey, Ohio, Pennsylvania, South Carolina and Texas.

“Like any other business — large or small — automakers have an obligation to represent the products they sell honestly, to ensure those products are safe, and to alert consumers when they discover a product defect that threatens consumer safety,” New Jersey Attorney General Christopher Porrino said in a statement. “When they fail to do so, as was the case with GM, we are committed to holding them accountable.”

The $120 million settlement includes $6 million for Florida, $4.3 million for New York, $4.1 million for New Jersey, $7.3 million for Texas and $3.2 million for Connecticut.

“Instead of prioritizing customers, General Motors turned a blind eye for years and chose to conceal the safety defects associated with several models of their vehicles,” New York Attorney General Eric Schneiderman said in a statement. “New Yorkers should not have to worry about their steering or brakes failing or their air bags not deploying when they get behind the wheel. Today's settlement ensures that drivers receive the transparency they deserve when they purchase a car.”