One of the great lessons of the pioneering computer scientist Alan Turing is this: Computers are only pretending machines. Software is always just imitating something else.

Volkswagen seems to have taken this maxim to new heights. The Environmental Protection Agency says that the company installed “defeat devices” in its four-cylinder Volkswagen and Audi-brand diesel cars from 2009 to 2015.

These devices, essentially, let the cars pretend to not break the law. The software could sense when the car was undergoing emissions testing and activate its pollution-control systems accordingly. When the car was being driven during normal use, these systems largely did not activate—making the car a much heavier polluter in real-life than it looked on paper.

With those systems deactivated, the car’s emissions violated the Clean Air Act and California’s state pollution-control regulation.

“Using a defeat device in cars to evade clean-air standards is illegal and a threat to public health,” said Cynthia Giles, assistant administrator for the EPA’s Office of Enforcement and Compliance Assurance, in a statement.

There are almost 500,000 vehicles on American roads with the devices installed, according to the EPA. Volkswagen must now pay to repair the emissions systems in affected cars. The government may also fine the company as much as $18 billion.

The device was discovered by researchers at West Virginia University, who notified the EPA and California state authorities. The two authorities investigated further, and after demanding “an explanation for the identified emission problems, Volkswagen admitted that the cars contained defeat devices,” said a statement from the agency.

I reached out to Volkswagen for comment and haven’t heard back yet. The Times reports that the company is complying with investigations.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.