Volkswagen AG will pay more than $10 billion to settle claims by nearly 500,000 owners stemming from its U.S. diesel emissions cheating scandal and fund efforts to offset pollution, three sources briefed on the agreement said on Thursday.

Speaking on condition of anonymity, due to court-imposed gag rules, a source said that owners will receive an average of $5,000 in compensation along with the estimated value of the vehicles as of September 2015, before the scandal erupted. Owners would also receive the compensation if they choose to have the vehicles repaired, assuming U.S. regulators approve a fix at a later date.

As part of the settlements, Volkswagen will to help boost zero emissions vehicles and introduce a program to offset excess diesel pollution from the offending vehicles.

The settlement is valued at $10.3 billion in documents outlining some of the complex settlements, the source added.

Another source said that figure does not include part of the environmental costs, which will raise the overall settlement total. The source would not disclose the overall total.

Volkswagen and the U.S. Environmental Protection Agency declined to comment.

In September, VW disclosed that it had used sophisticated software to evade emissions requirements in nearly 11 million vehicles worldwide. It also misled the EPA, which had started asking questions in 2014. The company’s chief executive officer, Martin Winterkorn, resigned in the wake of the scandal.

COMPLEX SETTLEMENT

Reuters reported last week the initial VW settlement would not include civil penalties under the U.S. Clean Air Act or address about 80,000 larger 3.0 liter Audi, Porsche and VWvehicles that emitted less pollution than 2.0 liter vehicles. A deal covering the 3.0 liter vehicles may still be months away.

The settlement also does not address lawsuits filed by U.S. states or investors or a criminal investigation by the Justice Department.

In April, U.S. District Judge Charles Breyer said the settlement will also include an offer to repair polluting vehicles if regulators approve it.

Regulators will not immediately approve fixes for the 2.0 liter vehicles – and may not approve fixes for all three generations of the polluting 2009-2015 vehicles, the sources told Reuters.

The settlement is complex, requiring owners to fill out detailed worksheets about their vehicle to calculate the buyback value.

Reuters reported in April that owners may have two years before having to decide whether to sell back vehicles.

German Probe

The EPA, California Air Resources Board, U.S. Justice Department, Federal Trade Commission and lawyers representing owners have been working for weeks to hammer out the final agreements.

VW is not expected to be allowed to resell or export repurchased vehicles, unless they convince regulators that they can be fixed, sources said.

Former owners of the polluting vehicles will also be eligible for compensation – although less than current owners, sources said.

In April, Volkswagen said it would set aside 16.2 billion euros ($18.2 billion) and slash its dividend to cover the costs from the scandal known as Dieselgate – including nearly 8 billion euros to cover buying back and fixing polluting vehicles.

EPA initially said VW’s emissions cheating affected 482,000 2.0 liter vehicles produced byVW, but the agency said last week the actual figure is 499,000 – since the original figure did not include some 2012 Passat diesels.

German prosecutors are investigating former CEO Winterkorn and VW brand chief Herbert Diess over whether they effectively manipulated markets by delaying the release of information about the emissions test cheating.