WASHINGTON (Reuters) - U.S. and California regulators have approved a fix for about 38,000 Volkswagen AG VOWG_p.DE 3.0-liter vehicles with potential excess emissions, a decision that could save the automaker more than $1 billion, according to a letter made public on Monday.

FILE PHOTO - A Volkswagen logo is seen at Serramonte Volkswagen in Colma, California, U.S., October 3, 2017. REUTERS/Stephen Lam/File Photo

The approval means the German automaker will not need to buy back luxury 2013-2016 model-year diesel Porsche Cayenne, Volkswagen Touareg and 2013-2015 Audi Q7 sport utility vehicles. Under a settlement approved by U.S. District Judge Charles Breyer in May, VW would have been forced to offer to buy back the vehicles if it had not won government approval for a fix.

In the May settlement, VW had agreed to spend at least $1.22 billion to fix or buy back nearly 80,000 vehicles with 3.0-liter engines. As part of that settlement, VW agreed to pay owners of vehicles who obtain fixes between $8,500 and $17,000.

Volkswagen, the best-selling automaker worldwide in 2016, could have been forced to pay up to $4.04 billion if the U.S. Environmental Protection Agency and California Air Resources Board failed to approve fixes for all 3.0-liter vehicles.

Some models will need hardware and software fixes, while newer models will get only a software upgrade.

The company is still awaiting approval for fixes for 3.0-liter diesel passenger cars. The company previously agreed to buy back about 20,000 older 3.0-liter diesel vehicles.

Volkswagen said it was pleased with approval and added it is working with regulators to develop fixes for other 3.0-liter vehicles “as quickly as possible.”

Last year, Breyer approved a separate settlement for Volkswagen worth up to $14.7 billion, requiring it to buy back 475,000 polluting vehicles with 2.0-liter engines.

In total, VW has now agreed to spend up to $25 billion in the United States to address claims from owners, environmental regulators, U.S. states and dealers and to make buyback offers.

In April, Volkswagen, which admitted to circumventing the emissions control system in U.S. diesel vehicles, was sentenced to three years’ probation after pleading guilty to three felony counts.

EPA posted the letter publicly after Reuters disclosed the approval earlier Monday.

Last month, VW said it was taking another $3 billion charge to fix diesel engines in the United States, lifting the total bill for its emissions-test cheating scandal to around $30 billion.

The company is still working to put the two-year-old “Dieselgate” scandal behind it, and seeking to transform itself into a maker of mass-market electric cars.