Over 500,000 Volkswagen and Audi vehicles equipped with a TDI diesel four-cylinder engine were designed by Volkswagen to cheat US emissions tests. As a result, these vehicles have been emitting as much as 40 times the level of smog-creating nitrous oxide allowed under regulations established under the Clean Air Act.

According to EPA enforcement officer Cynthia Giles, the vehicles in question were equipped with a “defeat device” that could sense emissions tests. “[They] contained software that turns off emissions controls when driving normally and turns them on when the car is undergoing an emissions test,” Giles told reporters during a press conference. “We expected better from Volkswagen…[this is] a threat to public health,” she added.

The Obama Administration has ordered a recall of all affected vehicles.

The “defeat devices” were installed on Volkswagen Beetles, Jettas, Passats, and Audi A3s manufactured between 2009 and 2015, as well as VW Golfs for the last two model years. These came in the wake of new emissions rules issued in 2008. The “defeat device” consists of a separate tank, containing a urea solution that is injected into the fuel system when the car’s computer senses testing conditions.

The defeat device was discovered during a study of diesel engines at West Virginia University and the International Council on Clean Transportation (ICCT). Researchers noted discrepancies between emissions levels under laboratory conditions and while actually driving. This raised a red flag for the EPA. The federal regulatory agency eventually confirmed the existence of the software. Dave Sullivan of marketing research group AutoPacific said, “I’m surprised that it took this long for somebody to find this out, but it was actually a very clever piece of software written to keep it hidden.”

Clever, indeed. For years, “Clean Diesel” has been one of Volkswagen’s big marketing ploys. Why was the company deliberately lying about this issue? ICCT Executive Director Drew Kodjak explained, “When the pollution controls are functioning on these vehicles, there’s a trade-off between performance and emissions.” Disabling pollution controls increases the vehicle’s acceleration and low-end torque.

A Volkswagen spokesperson acknowledged the situation and said the company was cooperating with federal investigators, but offered no explanation.

Nitrous oxide is a major contributor to air pollution, and is responsible for asthma and other serious respiratory diseases. Cynthia Giles said, “We intend to hold Volkswagen responsible.” The deception could cost the German automaker as much as $18 billion dollars in fines alone. It could also make Volkswagen the target of emission fraud lawsuits and penalties for false and misleading advertising as well as possible criminal action. In addition, Volkswagen will be required to repair the vehicles at no charge to their owners.