Volkswagen is being investigated by the U.S. Environmental Protection Agency and the California Air Resources Board for allegedly using software to game emission test results.

The so-called "defeat device" to evade clean air standards is a software algorithm on certain Volkswagen vehicles that detects if a car is undergoing official emissions testing and turns on full emissions controls only during the test, according to an EPA statement Friday.

A number of car makers including Volkswagen are increasing the software and automation in their vehicles, with some working on driverless cars.

EPA and teh California board (CARB) said they uncovered the software after independent analysis by researchers at West Virginia University, working with the International Council on Clean Transportation, a non-governmental organization.

The agencies decided on further research after results raised questions about emissions levels. Volkswagen is said to have admitted to the use of the defeat devices when confronted with the emission issues.

The EPA's notice states that four-cylinder Volkswagen and Audi diesel cars from model years 2009 to 2015 have the software that circumvents its emissions standards for certain air pollutants. About 482,000 diesel passenger cars sold in the U.S. since 2008 are affected in the investigation.

These include the Jetta, Beetle, Golf and Audi A3 models from 2009 to 2015 and Passat models from 2014 and 2015. The cars met emissions standards during tests, but released nitrogen oxides at up to 40 times the standard in normal conditions, in violation of the Clean Air Act, according to the EPA.

Volkswagen may be liable for civil penalties and injunctive relief for the violations and has been asked to fix the emission systems.