Volkswagen will spend $14.7 billion to settle consumer lawsuits and government allegations that it cheated on emissions tests in what lawyers are calling the largest auto-related class-action settlement in U.S. history.

WASHINGTON — Volkswagen Group will pay $14.7 billion in a sweeping settlement that includes compensation for owners for its polluting diesel-powered cars, environmental mitigation and funds to promote zero-emissions cars.

Owners of the 475,000 Volkswagen vehicles with 2-liter diesels covered under the settlement will receive payments ranging from $5,100 to $10,000 if they agree to the settlement. In addition, Volkswagen will either repair their cars to bring them into compliance with emissions laws — if it can figure out how to fix them — or buy back the cars or terminate the leases on them.

Buybacks will be worth at least $12,500 and are capped at $44,000.

“We’re getting VW’s polluting vehicles off the road and we’re reducing harmful pollution in our air, pollution that you never should have been emitted in the first place,” EPA Administrator Gina McCarthy said at a press conference. She called it a “groundbreaking settlement.”

The settlement covers consumer compensation, pollution remediation and false-advertising claims, but the EPA may still levy civil fines and U.S. prosecutors are conducting a criminal probe.

VW has admitted to inserting software in VW and Audi cars with 2-liter engines going back to 2009 that allows them to beat emissions tests. The case reflects “one of the most flagrant violations of environmental and consumer laws in our country’s history,” Deputy Attorney General Sally Yates told reporters.

Yates said that VW could face additional actions as well. A case is still pending against the automaker over its 3-liter diesel vehicles. Plus, she said the Justice Department is “aggressively” investigating “multiple companies and multiple individuals” allegedly tied to the violations.

In addition to more than $10 billion for the owners and the cars, VW will pay $2.7 billion in environmental mitigation over three years and another $2 billion on clean-emissions infrastructure over a decade. Also, VW said Tuesday that it has reached an agreement with states’ attorneys general that amounts to paying another $603 million.

Volkswagen, issuing a statement in conjunction with the settlement, said it hopes to earn back its customers’ trust.

“We take our commitment to make things right very seriously and believe these agreements are a significant step forward,” said Matthias Müller, CEO of Volkswagen. “We know that we still have a great deal of work to do to earn back the trust of the American people. We are focused on resolving the outstanding issues and building a better company that can shape the future of integrated, sustainable mobility for our customers.”

The automaker had promised to disclose the results of its internal investigation, but has since backed away.

Under the agreement, Volkswagen will buy back cars at prices tied to values last September before the scandal became known. Since then, resale values have plummeted. The automaker will not be allowed to ship unrepaired cars to other countries to avoid fixing or  scrapping them.

For those owners who elect to keep their cars, VW still hasn’t disclosed how it will go about repairing them or how much their performance will be affected. Some may not be repairable. The settlement requires 85% of the cars have be fixed or off the road by July 2019. If Volkswagen falls short of that benchmark, it will be required to pay additional penalties.

The amount of the payment to owners, which would be in addition to the buyback price, will depend on a number of factors, such as type, age of the vehicle, number of miles and others.

Bomey reported from Washington and Woodyard from Los Angeles