General Motors will not have to face dozens of lawsuits accusing it of concealing an ignition-switch defect that has been blamed for more than 200 deaths and serious injuries, a U.S. bankruptcy judge ruled on Wednesday.

U.S. Bankruptcy Judge Robert Gerber said that some drivers may assert claims against the automaker over its post-bankruptcy actions, but he declined to modify the bankruptcy plan of the old GM, which shielded it from suits related to prior actions.

GM has offered a compensation plan to those affected by the faulty ignition switches, including incidents that occurred before its bankruptcy, but some had opted to instead file lawsuits. Plaintiffs in the lawsuits said the company violated their constitutional rights by failing to disclose the defect, while GM had argued it was protected from claims on vehicles pre-dating its 2009 exit from Chapter 11 bankruptcy.

The Wednesday decision — which had been widely expected — means GM may avoid potentially billions of dollars in liability, as well as the cost of defending those lawsuits, although claims arising after its bankruptcy will not be affected. The plaintiffs will have to file their claims instead against the financially limited "Old GM," the shell company comprised of bad assets GM shed in bankruptcy.

Attorney Kenneth Feinberg, who was hired by GM to compensate victims, said Monday that there had been at least 84 deaths related to the faulty ignition switches.

Reuters and the Associated Press contributed to this report.

This story first appeared on CNBC.com.