Volkswagen has been caught using a device to manipulate the emissions output of its diesel engines during lab testing.

The EPA says the “defeat device” is sophisticated software on VW cars that detects when the car is going through official emissions testing. When the software recognizes an official test is underway, it turns on full emissions controls to make it appear the emission standards are within the rules. Once the official tests are completed, the emission controls are decreased during normal driving.

The automaker is likely going to face lots of fines and consumer blowback. This is going to get interesting.