SAN FRANCISCO (CBS / AP) – The owners of nearly half a million polluting Volkswagens in the U.S. will be given the option of selling them back to the company or getting them repaired at VW’s expense, under a deal announced by a federal judge on Thursday

Senior U.S. District Judge Charles Breyer, who is overseeing a tangle of litigation over the VW emissions scandal, gave no details on how much car owners would be paid but said the tentative agreement between the automaker, the U.S. government and plaintiffs’ attorneys would include “substantial compensation.”

READ MORE: UPDATE: State Attorney General Opens Civil Rights Investigation into Santa Clara County Sheriff's Office

However, a person who was briefed on the matter but asked not to be identified because the deal had not been made public said Wednesday that Volkswagen would spend just over $1 billion to compensate owners.

The judge also did not say how the vehicles would be repaired. He said the terms of the agreement were still being worked out and ordered all sides to keep them confidential during negotiations.

“I am extremely pleased to report that the parties have come up with a concrete plan by today’s date,” said Breyer, who had set Thursday as the deadline for an agreement.

The deal affects the owners of about 482,000 Volkswagens with 2-liter, four-cylinder diesel engines, most of them VW Jetta, Golf and Passat models dating to the 2009 model year.

Drivers will be able to choose repairs or buybacks, or, if they lease their vehicles, will be able to give them back.

No agreement has been reached yet on Volkswagen, Audi and Porsche vehicles with 3-liter, six-cylinder engines — an additional 90,000 or so vehicles.

Experts say fixing older-model diesels will be complicated and costly and will probably cut their performance and fuel mileage — two main reasons customers bought them.

Volkswagen said in a statement after the hearing that the agreement was “an important step on the road to making things right.” The automaker said it “intends to compensate its customers fully and to remediate any impact on the environment from excess diesel emissions.”

READ MORE: As 49ers and Packers Face Off in the Playoffs, Rodgers Snub Comes Up Again

Breyer said the agreement will include a fund for corrective efforts over the pollution, and Volkswagen will be required to commit other money to promote green automotive technology.

Details of the agreement must be made public by June 21. After that, owners will get the chance to comment before Breyer signs off on any deal.

The agreement does not settle lawsuits by state and local governments, which are seeking billions from the automaker. In addition, some Volkswagen dealers have sued over financial losses from diesel cars sitting on their lots that can’t legally be sold until the emissions problems are resolved.

Car owners and the U.S. Justice Department sued VW after it acknowledged in September that it installed software to fool emissions tests and put dirty vehicles on the road.

Analyst Marc-Rene Tonn at Warburg Research estimated the direct financial impact on Volkswagen from the scandal worldwide at 28.6 billion euros ($32.3 billion).

In the U.S., the company faces as much as $20 billion in fines for Clean Air Act violations alone, before paying to fix the cars or compensate their owners.

The Justice Department and Environmental Protection Agency also are weighing potential criminal charges against the company and senior executives.

Justice Department spokesman Wyn Hornbuckle said the investigation remains “active and ongoing.”

MORE NEWS: Man Stabbed In San Francisco Bayview District

© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.