Image copyright Reuters Image caption GM's bankruptcy in 2009 was one of the biggest in US history

A judge has ruled that General Motors is protected from dozens of lawsuits over faulty ignitions switches as a result of its 2009 bankruptcy filing.

GM has admitted it failed to alert regulators and issue a timely recall of cars that had faulty ignition switches which could cause a vehicle to accelerate.

The switches were linked to 160 injuries and 84 deaths.

GM filed for bankruptcy in 2009 during the height of the financial crisis.

Those filing the lawsuits against GM had argued that the firm violated their rights when it failed to disclose the defect.

However, GM said it was protected from those suits that were related to vehicles manufactured before it exited bankruptcy in 2009.

US bankruptcy judge Robert Gerber agreed with GM, and said that the lawsuits would have to be filed against "old GM", which is essentially the shell company GM set up as part of its bankruptcy proceedings which contains all of the company's bad assets.

GM was forced to recall nearly 2.6 million vehicles as a result of the defect, and set up a claims facility to compensate victims who could prove they suffered harm as a result of the defect.

However, those suing GM were generally those who were not compensated as a result of that fund or who alleged a loss of value in their vehicle as a result of the defects.

The total cost to GM as a result of the switch problems is estimated to be nearly $400m. One plaintiff's lawyer estimated the suits, if allowed to proceed, could have cost GM billions of dollars.