Volkswagen Group agreed to pay its 652 U.S. dealerships up to $1.21 billion to settle claims stemming from the company's emissions scandal.

The German automaker revealed the settlement late Friday in a federal court filing, reflecting an average payout of $1.85 million. Many dealers suffered steep losses over the last year as VW's U.S. sales slumped in the wake of the scandal.

The deal would resolve one of the episode's lingering questions: whether franchised dealers would be compensated after the manufacturer admitted to rigging nearly 600,000 U.S. diesel vehicles with illegal software to cheat emissions standards.

The accord, which must still be approved by a judge in San Francisco, is separate from a sweeping settlement between VW, the U.S. government, California regulators and consumers that will cost the company up to $14.7 billion.

Attorneys representing consumers said Friday that less than 1% of the consumers included in the settlement had opted out before a September deadline. Owners of the affected cars will get buybacks or a payment and a free repair. If VW can't come up with a fix, vehicle owners will be given a second chance to opt out.

For their part, dealers have been prohibited from selling the affected diesel vehicles until that fix is ready. Now, they'll get payments for their financial injury — with 50% upfront after a federal judge approves the settlement and the rest in equal installments over 18 months, according to the court filing.

Volkswagen also agreed to buy back the affected diesel cars still owned by dealers at the same terms consumers are receiving.

"Dealers had and still have thousands of new and used (diesel) cars on their lots that became immediately unsalable when Volkswagen issued its broad stop-sale orders," VW dealers said in a separate court filing. "When consumers learned of the emissions scandal, the entire market for Volkswagen’s diesel cars immediately disappeared and the tarnished brand name also caused precipitous decreases in sales of all Volkswagen cars.

"This factor weighs in favor of approval of the settlement because there is clear and meaningful relationship between the strength of the case and the benefits provided in the settlement."

Dealers who don't sign up for the settlement negotiated by a class-action group of attorneys can opt out and take their changes in a legal battle against VW in the courts.

The $1.21 billion figure represents the amount of the settlement if all dealers accept the offer, which would resolve their legal claims against the company.

Follow USA TODAY reporter Nathan Bomey on Twitter @NathanBomey.