WASHINGTON (Reuters) - Volkswagen AG VOWG_p.DE has agreed to a $1 billion settlement to fix or buy back another 80,000 polluting diesel vehicles sold in the United States as the German automaker on Tuesday took new steps to put its emissions cheating scandal behind it.

The settlement deal covered luxury VW, Audi and Porsche vehicles with 3.0-liter engines, meaning Volkswagen has now agreed to spend as much as $17.5 billion in the United States to resolve claims from owners as well as federal and state regulators over polluting diesel vehicles.

The world’s No. 2 automaker still faces the possibility of spending billions of dollars more to resolve a U.S. Justice Department criminal investigation and federal and state environmental claims, as well as oversight by a federal monitor.

The new agreement, settling part of litigation brought against VW by federal and California regulators, “is another important step forward in our efforts to make things right for our customers,” Hinrich Woebcken, president and CEO of Volkswagen Group of America, said in a statement.

U.S. District Judge Charles Breyer announced the settlement during a hearing in San Francisco.

Volkswagen also agreed to boost electric vehicle efforts in California and faces additional costs as it works to finalize an agreement to provide what Breyer called “substantial compensation” to the owners of the 3.0-liter vehicles.

Breyer in October approved VW’s earlier settlement worth about $15 billion with regulators and the U.S. owners of 475,000 polluting diesel vehicles with smaller 2.0-liter engines, including an offer to buy back all of the cars.

Breyer on Tuesday also said German engineering company Robert Bosch GmbH [ROBG.UL], which produced the software for the VW diesels, has agreed in principle to settle civil allegations made by U.S. diesel vehicle owners. Bosch confirmed it had reached the agreement, but said it was not accepting liability nor admitting to the allegations made in the lawsuit by owners who said the company was a knowing and active participant in VW’s emissions cheating scheme.

Reuters reported on Monday that the settlement was expected to be worth more than $300 million.

A Volkswagen logo is pictured at the newly opened Volkswagen factory in Wrzesnia, Poland, September 9, 2016. REUTERS/Kacper Pempel/File Photo - RTSSBWJ

VW admitted in September 2015 to installing secret software known as “defeat devices” in 475,000 U.S. 2.0-liter diesel cars to cheat exhaust emissions tests and make them appear cleaner in testing than they really were. In reality, the vehicles emitted up to 40 times the legally allowable pollution levels.

The company later admitted to also using “defeat devices” in the 3.0-liter vehicles. The 80,000 3.0-liter U.S. vehicles had an undeclared auxiliary emissions system that allowed the vehicles to emit up to nine times allowable limits.

The scandal hurt VW’s global business and reputation, and led to its CEO’s ouster.

POLLUTION REDUCTION

VW previously agreed to contribute $2.7 billion to a pollution reduction fund to make up for the excess emissions from its 2.0-liter diesel cars through programs like paying for school systems to buy newer, less-polluting buses to replace older ones. Under the new settlement, VW agreed to contribute another $225 million to the fund to offset the excess emissions from its 3.0-liter diesel engines.

Cynthia Giles, U.S. Environmental Protection Agency assistant administrator, estimated that the costs of buybacks, fixes and diesel offsets agreed to by VW in the new settlement amounted to about $1 billion.

Under the deal, VW will buy back or fix 20,000 of the 3.0-liter diesels and fix another 60,000. The automaker still must get U.S. regulatory approval for those fixes. The judge still must give final approval to the deal.

VW previously agreed to pay $5,100 to $10,000 in compensation to each of the U.S. 2.0-liter owners. If the new settlement follows this pattern, it could add $400 million to $800 million to the 3.0-liter settlement. But funds from Bosch’s settlement are expected to defray VW’s compensation costs.

California said in a separate court filing that Volkswagen agreed to add by 2020 at least three additional electric vehicles, including an SUV, in California and must sell an average of 5,000 electric vehicles annually through 2025. Volkswagen also agreed to pay California’s state air board $25 million, the state said.

California Air Resources Board executive officer Richard Corey said the new settlement showed that “cheaters will be caught and held accountable.”

As part of the earlier settlement, VW agreed to spend $2 billion over 10 years to boost zero-emission vehicle infrastructure.

The buyback offer is for about 20,000 2009-2012 Volkswagen Touareg and Audi Q7 diesel models. If VW had been forced to buyback all of the vehicles it could have added billions of dollars to the company’s costs.

Breyer said owners of 3.0-liter vehicles would receive “substantial compensation” for getting their vehicles fixed or repaired but said there were some remaining issues to be resolved, and set a another hearing for Thursday for an update.

Volkswagen on Monday also agreed to spend up to $1.6 billion to buy back up to 105,000 polluting 2.0-liter vehicles in Canada.