A judge on Friday ordered Volkswagen to pay a $2.8 billion criminal  penalty in the United States for cheating on diesel emissions tests,  blessing a deal negotiated by the government for a “massive fraud”  orchestrated by the German automaker.

U.S. District Judge Sean Cox stuck to the plea deal during the sentencing hearing, six weeks after VW pleaded guilty  to conspiracy and obstruction of justice in a scheme involving nearly  600,000 diesel cars in the U.S. They were programmed to turn on  pollution controls during testing and off while on the road.

Speaking from the bench in the heart of the global auto industry, Cox said he was amazed that VW would commit such a crime.

“Who has been hurt by this corporate greed? From what I can see it’s  not the managers at VW, the ones who get paid huge salaries and large  bonuses. As always it’s the little guy,” the judge said, referring to  car buyers and VW’s blue-collar workers who might earn less in the  future.

Separately, VW is paying $1.5 billion in a civil case brought by  government regulators and spending $11 billion to buy back cars and  offer other compensation.

Seven employees have also been charged with crimes in the U.S., but five are in Germany and are unlikely to be extradited.