DETROIT (AP) — Volkswagen is agreeing to settle consumer lawsuits and government allegations that it cheated on emissions tests by taking steps that will cost the company $14.7 billion.

Terms of the settlement were revealed Tuesday in orders filed with the U.S. District Court in San Francisco.

VW will pay just over $10 billion to either buy back the cheating diesel vehicles or repair them. It also will pay owners from $5,100 to $10,000 for their trouble. The German company also has to pay governments $2.7 billion for environmental mitigation and spend another $2 billion for research on zero-emissions vehicles in the U.S.

Lawyers say it’s the largest auto-related consumer class-action settlement in U.S. history.

(Copyright (c) 2024 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox