Volkswagen has agreed to buy back or fix nearly 500,000 diesel cars in the United States that were fitted with devices to cheat emissions testing.
The provisional agreement also includes a remediation fund to offset some of the environmental damage caused by the scandal.
Senior district judge, Charles Breyer, didn't specify how much car owners would be paid but said they'd receive "substantial compensation". Media reports suggest that the deal will set VW back at least $10bn (£7bn).
The US and VW now have until 21 June to complete details of the settlement.
Today's announcement doesn't include damages which could be bought against VW by the many state and local governments that have sued the automaker. VW dealers are also yet to resolve their issues with the firm.
The owners and the US Department of Justice sued VW after it admitted in September to cheating on emissions tests for 11m vehicles globally.
The company has broadly addressed matters with regulators in Europe — where it will repair vehicles to remove illegal software without offering compensation— but it has taken longer to reach a deal in the US.
“Volkswagen is committed to earning back the trust of its customers, dealers, regulators and the American public,” the company said in a statement.
“These agreements in principle are an important step on the road to making things right."
The VW fraud was first uncovered by US regulators, which made the problem public on 18 September last year.