A federal judge ordered Volkswagen AG to pay a $2.8 billion criminal fine for rigging diesel-powered vehicles to cheat on government emissions tests, formalizing a punishment the German auto giant agreed to earlier this year in an unprecedented plea deal with U.S. prosecutors.

U.S. Judge Sean Cox on Friday sentenced Volkswagen during a hearing in a Detroit federal court, a little over a month after the auto maker pleaded guilty to criminal charges stemming from the emissions fraud. Volkswagen admitted to conspiring for nearly a decade to deceive U.S. officials with illegal software that allowed vehicles to pass government emissions tests and then pollute far beyond legal limits on the road.

In addition to the fine, the judge's sentence includes the assignment of an independent monitor to audit Volkswagen's regulatory-compliance practices for at least three years. Including a separate $1.5 billion civil penalty, Volkswagen agreed to pay a total of $4.3 billion to settle the U.S. Justice Department probe.

Larry Thompson, a deputy attorney general under former President George W. Bush, has been named to lead the independent monitoring team at Volkswagen, Assistant U.S. Attorney John Neal said.

The auto maker will remain on probation for three years and has agreed to cooperate with continuing U.S. government probes and prosecutions of individuals tied to the scandal.

"This is a very serious and troubling case involving an iconic automobile company," Judge Cox said during the hearing, describing the plea deal as providing "just punishment" to the corporation.

"This is a deliberate and massive fraud perpetrated on the American consumer, and it would seem, consumers throughout the world," he said.

Volkswagen's general counsel Manfred Döss said the auto maker "deeply regrets the behavior that gave rise to this case."

"Plain and simple, it was wrong. We let people down and for that we are deeply sorry," Mr. Döss said.

With the criminal fine, Volkswagen's legal settlements stemming from its emissions fraud could exceed $25 billion in the U.S. alone depending on how many vehicles the auto maker is forced to repurchase. Volkswagen, which remains under investigation in Germany, has reached settlements in the U.S. with consumers, regulators, dealers, state attorneys general and federal prosecutors.

Volkswagen has admitted to installing so-called defeat devices on nearly 600,000 diesel-powered vehicles in the U.S. that duped environmental regulators. The auto maker has acknowledged putting the devices in some 11 million vehicles globally.

Judge Cox denied requests from some Volkswagen customers for restitution as part of the criminal case. Volkswagen separately on Friday gave affected customers who declined to take civil settlements another two weeks to weigh offers, with the clock starting on different dates depending on the kinds of engines in their vehicles.

Volkswagen agreed to the penalties meted out Friday in a plea deal with federal prosecutors disclosed this year. Judge Cox accepted Volkswagen's guilty plea in March to criminal charges, but postponed sentencing until Friday. Volkswagen pleaded guilty to conspiracy to defraud the U.S., commit wire fraud and violate the Clean Air Act; obstruction of justice; and import violations.

Separately, an engineer who pleaded guilty to criminal conduct for helping Volkswagen cheat on emissions tests, James Liang, is scheduled to be sentenced in May.

A half-dozen other Volkswagen employees were also indicted in the company's emissions fraud, though most of them reside in Germany and are unlikely to appear in the U.S. to face charges.

One of them, Oliver Schmidt, the former head of Volkswagen's environmental compliance office in Michigan, was arrested in January at Miami International Airport before boarding a plane to Germany. Judge Cox denied a recent bail request from Mr. Schmidt, who remains imprisoned in Michigan until he faces trial early next year.