FILE - This Feb. 14, 2013, file photo, shows the logo on the grill of a Volkswagen on display in Pittsburgh. On Friday, March 10, 2017, Volkswagen is expected to plead guilty to three criminal counts at a morning hearing in Detroit federal court for cheating on diesel emissions tests. (AP Photo/Gene J. Puskar, File)
FILE - This Feb. 14, 2013, file photo, shows the logo on the grill of a Volkswagen on display in Pittsburgh. On Friday, March 10, 2017, Volkswagen is expected to plead guilty to three criminal counts at a morning hearing in Detroit federal court for cheating on diesel emissions tests. (AP Photo/Gene J. Puskar, File) Credit: Gene J. Puskar

Volkswagen pleaded guilty Friday to conspiracy and obstruction of justice and agreed to pay a $4.3 billion penalty for a brazen scheme to program nearly 600,000 vehicles to cheat on U.S. emissions tests.

The criminal and civil penalty, if approved by a federal judge, would be the largest ever levied by the U.S. government against an automaker. VWโ€™s total cost of the scandal now has been pegged at about $21 billion, including a pledge to repair or buy back vehicles.

U.S. regulators confronted VW about the software after West Virginia University researchers discovered differences in testing and real-world emissions of harmful nitrogen oxide. Volkswagen at first denied the use of the so-called defeat device but finally admitted it in September 2015.

Even after that admission, company employees were busy deleting computer files and other evidence, VWโ€™s general counsel Manfred Doess acknowledged to U.S. District Judge Sean Cox.