Update: Martin Winterkorn resigned as chief executive of Volkswagen on Wednesday.

It is incredible that anyone at Volkswagen thought the company could get away with it. Did the engineers and executives who came up with that bit of cheating software ever consider the enormous risk they were taking? Did they really think it was worth the inestimable damage to their customers, to the environment, to their shareholders and to their venerable brand to squeeze a bit of illicit power out of their engines?

Yet that’s exactly what they did, according to an announcement by the Environmental Protection Agency on Friday. VW’s share prices promptly plummeted 19 percent; the company now faces billions in fines, costly recalls, possible class-action lawsuits and criminal charges, investigations into its global practices and tremendous blows to sales, to the VW brand and to Germany’s vaunted auto industry.

Senior executives are rushing to express remorse for installing “defeat devices” in Volkswagens and Audis with 2-liter diesel engines not only in the United States but in an astonishing 11 million cars worldwide. The devices consisted basically of software that lowered emissions to legal standards during emissions testing but let the pollutants spew the rest of the time, increasing performance. The bad stuff includes nitrogen oxides, a primary constituent of health-threatening smog, and microfine particulate matter, which causes respiratory disease. Both are strictly regulated under the Clean Air Act. For something this deceitful and stupid, a corporate mea culpa is not enough. Volkswagen must explain how something like this could happen, and identify those who came up with the idea and authorized it.

Discrepancies between claimed emission levels and those achieved in everyday driving are not, alas, unusual. Last November, the South Korean carmakers Kia and Hyundai paid more than $300 million in fines and penalties for misrepresenting the emissions from their cars. But there is a difference between fudging figures and actually devising and installing clever software on cars solely to deceive inspectors and consumers.