WASHINGTON (AP) — Automaker Daimler AG and subsidiary Mercedes-Benz USA have agreed to pay $1.5 billion to the U.S. government and California state regulators to resolve emissions cheating allegations, officials said Monday.

The U.S. Department of Justice, Environmental Protection Agency and the California attorney general’s office say Daimler violated environmental laws by using so-called “defeat device software” to circumvent emissions testing and sold about 250,000 cars and vans in the U.S. with diesel engines that didn’t comply with state and federal laws.

The settlement, which includes civil penalties, will also require Daimler to fix the vehicles, officials said. In addition, the company will pay $700 million to settle U.S. consumer lawsuits.

The Stuttgart, Germany-based automaker said on Aug. 13 that it had agreements with the Justice Department, Environmental Protection Agency, Customs and Border Protection, the California Air Resources Board and others over civil and environmental claims involving the diesel cars and vans.

Environmental Protection Agency Administrator Andrew Wheeler said Daimler did not disclose all of its software, which included “devices designed to defeat emissions controls.”

In a statement, Daimler said it denies the allegations that it cheated and does not admit to any liability in the U.S. The settlements resolve civil proceedings without any determination that Mercedes and Daimler vehicles used defeat devices, the company said. Plus, Daimler said it did not receive a notice of violation of the Clean Air Act from the EPA or California regulators, which is common when defeat devices are used.

The company said it is not obligated to buy back the vehicles, as Volkswagen was, nor will it have an independent monitor to track its progress on the settlement. “By resolving these proceedings, Daimler avoids lengthy court actions with respective legal and financial risks,” the company said.

Daimler also said the emissions control system in the U.S. vehicles is different than models sold in Europe because of different regulatory and legal requirements.

Daimler AG said the settlement would bring costs of about $1.5 billion, and the civil settlement will bring a one-off charge of $875 million. It estimated that “further expenses of a mid three-digit-million” euros would be required to fulfill conditions of the settlements.

Daimler said owners of model year 2009 through 2016 Mercedes cars and 2010 through 2016 Sprinter vans with “BlueTEC II” diesel engines will be notified of recalls to fix excessive vehicle emissions. Customers will receive letters starting late this year, and the company will set up a customer website, Daimler said in a statement.

The letters will have details of the civil lawsuit settlement including a claim form, Daimler said. Separately, the company will pay attorneys fees of around $83 million.