General Motors has agreed to pay $900 million to resolve criminal charges for concealing a defective ignition switch linked to at least 169 deaths, federal prosecutors said Thursday.

The agreement calls for two charges—wire fraud and scheming to conceal information from government regulators—to be dropped after three years if the automaker cooperates fully.