A team of international researchers has uncovered the software cheat that allowed Volkswagen to bypass U.S. and European emission tests for over at least six years before the Environmental Protection Agency put the company on notice in 2015 for violating the Clean Air Act. 

During a year-long investigation lead by Kirill Levchenko, a computer scientist at the University of California San Diego, researchers found code they believe allowed a car's onboard computer to determine if the vehicle was undergoing an emissions test. 

When activated car's onboard computer then activated the car's emission-curbing systems which reduced the amount of pollutants emitted. Once the computer determined that the test was over, the systems were deactivated.

When the software emissions-curbing system wasn't running, cars emitted up to 40 times the amount of nitrogen oxides allowed under EPA regulations.

The revelation led to Volkswagen being fined $2.8 billion dollars in the United States; part of a $4.3 billion plea agreement reached in January between the German automaker and the federal government.

The team's findings will be presented at the 38th IEEE Symposium on Security and Privacy in the San Francisco on May 22 to 24, 2017.

"We were able to find the smoking gun," Levchenko said. "We found the system and how it was used," according to the UC San Diego Jacob's School of Engineering website.

Computer scientists obtained copies of the code running on Volkswagen onboard computers from the company's own maintenance website and from online forums run by car enthusiasts. 

The code was running on a wide range of Volkswagen models, including the Jetta, Golf and Passat, as well as Audi's A and Q series vehicles.

"We found evidence of the fraud right there in public view," Levchenko said.

During emissions tests, cars are placed on a chassis equipped with a dynamometer, which measures the power output of the engine. The vehicle follows a precisely defined speed profile that tries to mimic real driving on an urban route with frequent stops, according to the team's paper.

Conditions of the test are both standardized and publicly available, making it possible for manufacturers to intentionally alter the behavior of their vehicles during the test cycle. 

The code found in Volkswagen vehicles checks for a number of conditions associated with a driving test, such as distance, speed and even the position of the wheel. If the conditions are met, the code directs the onboard computer to activate emissions-curbing mechanism when those conditions were met.

"The Volkswagen defeat device is arguably the most complex in automotive history," Levchenko said.

The team examined 900 versions of the code and found that 400 of that included information to circumvent emissions tests.

Channel 3 reached out to Volkswagen for comment on this story.