General Motors Co. has agreed to a $120 million settlement over faulty ignition switches that allegedly caused cars to stall and air bags to deploy, in some cases triggering fatal accidents.

The deal, which must be approved by a judge, would resolve hundreds of lawsuits filed before the automaker sought bankruptcy protection in 2009.

Under the settlement, which was filed Friday in federal court in Manhattan, GM will contribute as much as $70 million to drivers and in some cases their survivors.

A trust formed in connection with its bankruptcy will contribute $50 million, according to the settlement. GM also agreed to pay as much as $34.5 million to the lawyers who represented drivers in the court case.

GM denies any wrongdoing.