Volkswagen pleaded guilty Friday to conspiracy and obstruction of justice in a brazen scheme to get around U.S. pollution rules on nearly 600,000 diesel vehicles by using software to suppress emissions of nitrogen oxide during tests.

The German automaker has agreed to pay $4.3 billion in civil and criminal penalties - the largest ever levied by the U.S. government against an automaker - although VW's total cost of the scandal 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. 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.

Summing up the scandal, Assistant U.S. Attorney John Neal said it was a "calculated offense," not a "momentary lapse of judgment."

The judge said he wanted more time to study the terms of the punishment negotiated by the U.S. Justice Department, including a $2.8 billion criminal fine. He set a sentencing date of April 21.

"This is a very, very serious offense," Cox said.

Although the cost is staggering and would bankrupt many companies, VW has the money, with $33 billion in cash on hand. Volkswagen previously reached a $15 billion civil settlement with U.S. environmental authorities and car owners.

Under its agreement, VW must cooperate in the investigation and let an independent monitor oversee compliance for three years. Separately, seven Volkswagen employees have been charged in the scandal.

___

This story has been corrected to fix spelling of last name of Manfred Doess.