Volkswagen Group will pay a $2.8 billion fine to the federal government for using software to cheat diesel emissions tests.

The criminal fine was part of a larger $4.3 billion settlement approved Friday by federal Judge Sean Cox in Detroit, the Detroit Free Press reported. Volkswagen and federal officials, including the Justice Department and Environmental Protection Agency (EPA), originally agreed to the deal in January.

The settlement is a fraction of the $17 billion to $34 billion that Volkswagen could have been required to pay under the Clean Air Act for willfully violating emissions rules, but Cox said it is sufficient.

ADVERTISEMENT

“This is a case of deliberate, massive fraud perpetrated by VW management,” Cox said in court, according to the Free Press. “This case also involves a failure of the VW supervisory board, which is government, labor and shareholders.”

Cox had previously been skeptical of the lowered amount but came around by the time of his ruling.

“This corporate greed, this failure of management … has cost VW billions and billions of dollars,” he said. “The individuals who will be hurt the most are the working men and women at VW.”

The settlement closes a major chapter in the ongoing, worldwide scandal often dubbed “Dieselgate.”

The EPA discovered in 2015 that Volkswagen had programmed hundreds of thousands of its diesel-fueled cars and SUVs to detect when they were undergoing an emissions test and turn on controls for nitrogen oxides.

The controls were not active during normal driving, greatly increasing the amount of pollutants the vehicles produced, Volkswagen has since admitted.

The scandal shook up Volkswagen's leadership, with the company spending billions to settle government and private claims related to it, including retrofitting or buying back vehicles.