Volkswagen is inching closer to putting its “Dieselgate” scandal in the rearview mirror. The automaker has agreed to a $157 million settlement that will end lawsuits in 10 states, and it has been cleared to start selling diesels in the U.S. again.

Volkswagen announced Thursday that it had reached an agreement [PDF] with the attorneys general of 10 states to resolve additional environmental and consumer claims over its use of so-called “defeat devices” to skirt federal emissions standards.

The $157 million settlement will be split between Connecticut, Delaware, Massachusetts, Maine, New York, Oregon, Pennsylvania, Rhode Island, Vermont, and Washington and used to offset the environmental impact of the excess emissions.

Each of the states in the settlement are what is referred to as “Section 177 States.” This means they have all incorporated into their state law more stringent auto emissions standards established by California under the Clean Air Act.

By reaching the agreement, VW says it “avoids further prolonged and costly litigation as Volkswagen continues to work to earn back the trust of its customers, regulators and the public.”

New York Attorney General Eric Schneiderman, who accused VW of committing fraud in a July 2106 lawsuit, says his state will receive $32.5 million as a result of the settlement.

“Volkswagen, Audi and Porsche tried to pull off an extraordinarily cynical corporate fraud – deceiving hundreds of thousands of consumers, pumping thousands of tons of harmful pollution into our air, and flouting New York and federal environmental laws designed to protect public health,” Attorney General Schneiderman said in a statement. “Now, this state environmental penalty makes clear that no company – however large or powerful – is above the law in New York.”

The agreement is in addition to VW’s previous 44-state settlement reached last year to resolve state consumer protection claims. However, the company notes that settlement did not include claims for injunctive relief or restitution related to 3.0L TDI V6 vehicles, which are included in the settlement announced today.

In other VW “Dieselgate” news, Bloomberg reports that the car maker announced that nearly two years after it stopped selling diesel-engine vehicles in the U.S. it has received approval from the Environmental Protection Agency to allow dealers to offer for sale model year 2015 vehicles with approved emission modifications.

A spokesperson for VW tells Bloomberg the company is still finalizing the details of the program.

For now, the sales will apply only to the approximately 12,000 vehicles in dealer stock. The spokesperson tells Bloomberg that eventually sales will include used 2015 diesels that have been bought back by the carmaker as part of its settlement with U.S. regulators.

VW issued a stop sale on the vehicles in Sept. 2015, just days after the company’s use of so-called “defeat devices” to skirt federal emissions standards came to light.

The emissions software update was actually approved in January when the EPA and the California Air Resources Board said VW had provided an adequate fix for 70,000 2-liter Volkswagen vehicles that release up to 40-times the allowable rate of nitrogen oxide.

The remedy, which is to take place in two phases over the next year, applied to model year 2015 Volkswagen Beetle, Beetle Convertible, Golf, Golf SportWagen, Jetta, and Passat, and the model year 2015 diesel Audi A3.

The first phase, available now, will remove the defeat device software and replace it with software that directs the emission controls to function effectively in all typical vehicle operation, the EPA says.

The second phase, which will take place next year, involves VW installing additional software updates and hardware, including a diesel particulate filter, diesel oxidation catalyst, and NOx catalyst — all of which are needed to maintain vehicle reliability and emissions performance over time.

Editor's Note: This article originally appeared on Consumerist.