Volkswagen Group has agreed to pay up to $14.7 billion in civil penalties and consumer compensation to settle emissions-cheating claims with regulators and owners of nearly 500,000 diesel-powered vehicles.

The affected vehicles include 2009 through 2015 Volkswagen TDI diesel models of Jettas, Passats, Golfs and Beetles as well as the TDI Audi A3.

The settlement is a huge step towards resolving a significant portion of a crisis that sparked litigation and investigations across the globe and cost the German auto giant’s chief executive his job.

According to federal officials, the proposed settlement, which is the largest for any automaker in the United Sates, would cover claims from the federal Justice Department, Environmental Protection Agency (EPA) and Federal Trade Commission, and a class-action lawsuit from consumers who bought the vehicle

About $10.033 billion will go towards buybacks or repairs of about 475,000 Audi and Volkswagen vehicles with 2-liter engines, which number about 475,000 in the US, while nearly $5 billion will go towards offsetting excess diesel emissions and boost investment in zero emission vehicles. Vehicle owners will also get $10,000 in settlement of their claims.

The settlement does not include other countries and does not preclude other possible civil or criminal financial penalties that could later be levied by the Justice Department.

For instance, Volkswagen still faces another potentially expensive settlement with vehicle owners and government officials over similar problems linked to about 85,000 vehicles with three-liter diesel engines, most of them Audi and Porsche luxury models.

Volkswagen must also get 85 percent of the affected two-liter vehicles off the roads or make them environmentally compliant by June 2019, or risk facing substantial fines.

According to the civil complaint against Volkswagen filed by the Justice Department on behalf of EPA on January 4, 2016, Volkswagen allegedly equipped its 2.0 liter diesel vehicles with illegal software that detects when the car is being tested for compliance with EPA or California emissions standards and turns on full emissions controls only during that testing process.

During normal driving conditions, the software renders certain emission control systems inoperative, greatly increasing emissions. This is known as a “defeat device.”  Use of the defeat device results in cars that meet emissions standards in the laboratory, but emit harmful NOx at levels up to 40 times EPA-compliant levels during normal on-road driving conditions. 

The Clean Air Act requires manufacturers to certify to EPA that vehicles will meet federal emission standards.  Vehicles with defeat devices cannot be certified.

“This historic agreement holds Volkswagen accountable for its betrayal of consumer trust, and requires Volkswagen to repair the environmental damage it caused,” said Elizabeth Cabraser, the court-appointed lead counsel for the plaintiffs, in a statement.

“To achieve relief for consumers so swiftly on such a large scale is unprecedented,” she added.

The terms of the settlement still need to be approved by a federal judge.

“By duping the regulators, Volkswagen turned nearly half a million American drivers into unwitting accomplices in an unprecedented assault on our environment,” said Deputy Attorney General Sally Q. Yates.  “This partial settlement marks a significant first step towards holding Volkswagen accountable for what was a breach of its legal duties and a breach of the public’s trust.  And while this announcement is an important step forward, let me be clear, it is by no means the last.  We will continue to follow the facts wherever they go.”

Volkswagen, in a statement, said it was pleased to reach the deals and begin moving forward to rebound from the crisis. 

“We take our commitment to make things right very seriously and believe these agreements are a significant step forward,” VW CEO Matthias Müeller said in the statement.