General Motors has agreed to pay a $900m (£580m) fine to avoid a criminal investigation into allegedly hiding information about defected ignition switches that caused the deaths of more than 100 people.

In 2014, the US's largest car manufacturer recalled 2.6 million cars worldwide over faulty ignition switches that would unexpectedly switch off causing engines and breaks to shut down. The fault caused crashes that killed at least 124 people and injured 275 more. GM then set up a fund worth $600m to compensate the victims, with families of those who died getting up to $1m.

"The mistakes that led to the ignition switch recall should never have happened," said GM CEO Mary Barra. "We have faced our issues with a clear determination to do the right thing both for the short term and the long term. I believe that our response has been unprecedented in terms of candour, cooperation, transparency and compassion."

Reuters reported that GM admitted to failing to disclose a potentially lethal defect and misleading consumers about the safety of vehicles. The car manufacturer has entered into a three-year deferred prosecution agreement, during which an independent monitor will oversee its practices and ability to fix the defects effectively. Criminal charges will be dropped if the manufacturer is able to meet obligations under this agreement.

GM fired 15 employees in 2014 after an investigation that revealed engineers and lawyers knew about the defect for a decade before any cars were recalled. The company's chairman, Theodore M Solso, said: "The changes the company has made in the last 15 months have made it much stronger."

Bob Hilliard, lead lawyer for victims who suffered death and injuries caused by GM's defect, said: "Lives were taken and families were devastated and there is no way to ever change that sad fact."

However, he accepted that the agreement will allow "some healing" and said: "GM recognises, through its payment of financial compensation, the needlessness of this enormous national tragedy."