A federal judge in San Francisco is facing a Tuesday deadline to decide whether to approve the largest auto-scandal settlement in U.S. history, giving most affected Volkswagen owners the option for a vehicle buyback after the company acknowledged cheating on emissions testing and putting dirty cars on the road.

U.S. District Judge Charles Breyer said at a hearing last week that he was strongly inclined to give the nearly $15 billion deal final approval but wanted time to consider owners' objections and decide whether he should recommend any changes.

Breyer gave preliminary approval in July. It calls for the German automaker to spend up to $10 billion to buy back or repair about 475,000 Volkswagens and Audi vehicles with 2-liter diesel engines and pay their owners an additional $5,100 to $10,000 each.

The settlement also includes $2.7 billion for unspecified environmental mitigation and an additional $2 billion to promote zero-emissions vehicles.

The scandal has damaged Volkswagen's reputation and hurt its sales. The company is still facing potentially billions more in fines and penalties and possible criminal charges.

Attorneys who negotiated the settlement said it included substantial payments to car owners and had resounding support.

More than 330,000 people have signed up for settlement benefits, with about 3,200 opting out, Elizabeth Cabraser, lead attorney for the plaintiffs, told Breyer at a hearing last week.

More on this...

Some owners objected, saying they should receive the full purchase price of their vehicles. Mark Dietrich, an Audi owner from San Francisco, told the judge last week that Volkswagen played owners for fools and the settlement didn't go far enough to compensate them for the company's fraud.

Volkswagen attorney Robert Giuffra encouraged Breyer to approve the deal, saying it was good for buyers and would help the company regain people's trust.

The company said in April that it has set aside $18.2 billion to cover the cost of the global scandal, which erupted in September 2015 when the U.S. Environmental Protection Agency said Volkswagen had fitted many of its cars with software to fool emissions tests. Car owners and the U.S. Department of Justice sued.

The software recognized when the cars were being tested on a treadmill and turned on pollution controls. The controls were turned off when the cars returned to the road. The EPA alleged the scheme let the cars spew more than 40 times the allowable limit of nitrogen oxide, which can cause respiratory problems in humans.

The company's sales have since faltered. In the first five months of 2015, before the scandal, Volkswagen sold 144,006 cars in the U.S. In the first five months of this year, the total fell 13 percent, to 125,205.