NEW YORK (CBSNewYork/AP) — Volkswagen’s $14.7 billion settlement announced Tuesday is the largest auto-related consumer class-action settlement in U.S. history, lawyers said.

Volkswagen on Tuesday agreed to settle consumer lawsuits and government allegations that it programmed cars with 2-liter diesel engines to cheat on emissions tests. VW admitted to installing software that turned on pollution controls during emissions testing then turned them off when the cars were on the road.

READ MORE: COVID Vaccination Rate Among Nursing Home Staffers Has Families Of Residents Concerned

One settlement, for more than $570 million, is with more than 40 states for violating state laws prohibiting unfair or deceptive trade practices.

New York will receive $30 million in penalties for the state’s general fund and another $115 million to replace dirty diesel engines and improve air quality, WCBS 880’s Rich Lamb reported.

Connecticut Attorney General George Jepsen said the state will put about $16 million of its share into the state’s general fund. The remainder will go into state consumer protection funds. The state is pursuing additional penalties from Volkswagen for violating environmental laws.

Connecticut also is eligible under another Volkswagen settlement to receive $51 million to support environmental programs.

As part of the settlement, the company must offer to buy back most of the affected 475,000 cars with diesel engines, or terminate their leases. That’s because, according to court documents filed Tuesday, there currently is no repair that can bring the cars into compliance with U.S. pollution regulations.

New York Attorney General Eric Schneiderman said those who own a Volkswagen, Audi or Porsche manufactured between 2008 and 2015 can choose to sell their cars back at the pre-scandal, fair market value and receive an additional cash payment of at least $5,000. Car owners can also opt to wait for a fix.

READ MORE: COVID Vaccine: MTA Unveils 8 New Pop-Up Sites In Metro Area, Offering Johnson & Johnson Shot And Incentives

“Consumers have two options: they can either take the buyback or they can take the fix. In either case, they get the money,” Schneiderman said.

If VW does propose a repair, it must be approved by the Environmental Protection Agency and the California Air Resources Board.

Volkswagen will be closely monitored even if it is able to fix the vehicles.

For the next five years, the settlement requires the company to notify the Environmental Protection Agency and the California Air Resources Board every time it tests one of the modified vehicles. The agencies will send representatives to observe those tests. If a vehicle fails a test, the company must notify the agencies within 72 hours and face possible penalties.

Volkswagen is also required to submit annual reports on its testing through 2023.

If Volkswagen is found to be selling any unrepaired vehicles, or returning unrepaired vehicles to owners, it must pay a penalty of $50,000 per vehicle.

MORE NEWS: NYPD Investigating Assault, Slashing At Times Square Subway Station

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)