The US Justice Department (DOJ) on Thursday announced a $305 million civil settlement between Fiat Chrysler and the Environmental Protection Agency (EPA) in a lawsuit over illegal software found on certain diesel Dodge Ram models and diesel Jeep Grand Cherokee models.

The terms of the settlement also included an additional $19 million payment to the state of California, which regulates auto emissions through the California Air Resources Board (CARB).

On top of all this, Fiat Chrysler is expected to upgrade the software on all of the offending vehicles and pay into a mitigation fund designed to ameliorate damage done by excess nitrogen oxide (NO x ) emissions. The two programs together will cost the company an additional $185 million.

The DOJ said Fiat Chrysler will also have to pay a $6 million civil penalty to US Customs and Border Protection to "resolve allegations of illegally importing 1,700 noncompliant vehicles."

The settlement comes two years after the EPA accused Fiat Chrysler of installing undisclosed and illegal software on 104,000 vehicles, including 3.0L diesel Dodge Ram 1500 trucks and diesel Jeep Grand Cherokees between model years 2014 and 2016. The EPA claimed the software would sense when the vehicle was being tested under laboratory conditions and implement the full emissions control system so that the car could pass the EPA's emissions tests. But when the vehicle was being driven under real-world conditions, the software would reduce the effectiveness of the emissions control system so the car would perform better.

Following the leader (Volkswagen Group)

If you're thinking that sounds an awful lot like the scam that put Volkswagen Group in hot water between 2015 and 2017, you're not far off. EPA spokesperson George Hull told Ars in an email that the VW Group software and the software the EPA identified on Fiat Chrysler cars are distinct. However, the software appears to be similar in purpose. An EPA information sheet notes that Fiat Chrysler vehicles included "at least eight software-based features" that "defeat or lessen the effectiveness of the vehicles' emission control systems during certain normal driving situations."

Hull told Ars that only five of those software-based features were found on all models. "One of them was only present in the model year 2014 vehicles, while two were only present in the model year 2015 and model year 2016 vehicles," Hull wrote. "There were also changes to the software and calibrations from year to year that altered how some of the Auxiliary Emission Control Devices were implemented across the model years."

We know that the VW Group software included at least 10 "checks" to determine if the vehicle was in a lab or not. The code on the car would then tune down emissions control features (like fuel injection timing, how exhaust gas is recirculated through the vehicle, and how much urea should be injected into the exhaust) accordingly.

There are differences, however, in these two diesel scandals. The EPA says Fiat Chrysler only sold about 104,000 illegal vehicles, compared to the more than 600,000 emissions-cheating vehicles that VW Group sold (including 2.0L and 3.0L Volkswagens, Audis, and Porsches). Fiat Chrysler also appears to have proposed a software-based fix for all of its vehicles in a timely manner. The VW Group scandal was notable in that regulators were skeptical of many of the software-based and physical fixes that the company proposed to keep its customers' vehicles on the road.

As part of the settlement, Fiat Chrysler will have to make sure that at least 85 percent of its US fleet is upgraded to conform to US emissions standards within two years of the final court approval of the settlement.

According to The Wall Street Journal, "The company didn't admit to any environmental violations under the settlement and said there was no 'deliberate scheme to install defeat devices to cheat emissions tests.'"

The settlement doesn't end all legal woes for Fiat Chrysler yet: criminal charges could still be brought against the company, and ongoing lawsuits from individual consumers will continue.