The Justice Department has launched a criminal investigation into whether Volkswagen cheated on emissions standards, according to two people familiar with the matter, intensifying pressure on the German car giant.

The investigation follows a charge by the Environmental Protection Agency on Friday that the automaker designed software to let its diesel cars detect when they were being tested for emissions.

The company’s stock plunged Monday, wiping out nearly a fifth of its public stock value. At least one class action has already been filed, and German officials said they would launch their own investigation.

A Justice Department spokesman declined to comment. Volkswagen, which has said it will cooperate with regulators, did not return calls seeking comment Monday.

Speaking at a Brooklyn event to launch a new model Monday night, VW’s U.S. chief, Michael Horn, was blunt about the situation. “Let’s be clear about this: Our company was dishonest with the EPA and the California Air Resources Board and with all of you,” Horn said. “In my German words, we have totally screwed up.”

Volkswagen shares plunged more than 20 percent Monday, their biggest ever one-day fall. (Shannon Stapleton/Reuters)

In the lab, VW cars met emission standards, according to the EPA. On the road, regulators say, they emitted nitrogen oxide at up to 40 times federal standards. The software, known as a “defeat device,” was installed in some 482,000 cars, spanning model years 2009 through 2015, regulators say.

VW, one of the world’s largest automakers, has halted sales of some vehicles in the United States. “We at Volkswagen will do everything that must be done in order to re-establish the trust that so many people have placed in us, and we will do everything necessary in order to reverse the damage this has caused,” Martin Winterkorn, VW’s chief executive, said in a statement Sunday.

The EPA and California regulators began asking questions in May 2014 after West Virginia University researchers published a study that found lab results did not match up with road tests.

For more than a year, VW told regulators that the difference owed to “various technical issues and unexpected in-use conditions,” the EPA said in a letter sent to the automaker Friday. But company officials did not acknowledge the practice until earlier this month when regulators threatened not to approve its 2016 line of diesel cars, the letter said.

The years-long practice could carry a hefty price tag for the automaker. The company could be fined $37,500 for each car it sold with a defeat device installed — a potential fine of $18 billion. (VW last year reported profits of 11.1 billion euros, or $12.4 billion.)

The controversy could also put a big dent in VW’s already slumping U.S. sales as the company scrambles to shore up customer support.

On Sunday, Winterkorn attempted to do damage control, saying in the statement: “The Board of Management at Volkswagen AG takes these findings very seriously. I personally am deeply sorry that we have broken the trust of our customers and the public.”

VW and the EPA say car owners do not need to do anything now. The cars are still legal to drive and to sell secondhand, and VW says it is working on a fix. But it has halted sales of its diesel cars in the United States.

“Anything that is in inventory, we have parked and are not going to sell it,” said Jack Fitzgerald, owner of Fitzgerald Auto Group, who has Volkswagen dealerships in Frederick, Md., and Annapolis. “All [Volkswagen has] told us so far is not to sell them.”

It is unclear how widespread the defeat devices are. If the technology was also used in Europe, where emissions standards are looser and diesels are more popular, that could spell bigger trouble for VW, said Matt DeLorenzo, a managing editor at Kelley Blue Book.

Meanwhile, the company is already being hit with lawsuits. Steve W. Berman, one of the lead lawyers in the ignition-switch case against General Motors, has filed a case in the Northern District of California. The case alleges that VW charged a premium for its “clean diesel” technology, as much as $6,000 per car.

“The half a million people who own these cars are furious, and with good reason,” said Berman, managing partner of Hagens Berman. “Not only did they pay more for something they never received, but they’ve been victim to a tremendous act of deception.”

Local governments could also get involved, citing the public health impact of nitrogen oxide, which is a major component of smog, and class-action suits could follow from consumers who feel they were misled or fear a damaged resale value.

“For the brand, it’s a tremendous black eye at this point,” DeLorenzo said. “It’s just the tip of the iceberg, really. You don’t know what it’s going to cost them.”

In Germany, the allegations have sparked a firestorm of recriminations even as the government in Berlin said it would launch an investigation into possible wrongdoing. Specifically, German officials said they would probe whether the company — or any German automaker — was willfully trying to do the same on European streets.

“We expect the automobile manufacturers to provide reliable information so that the Federal Office for Motor Vehicles . . . can investigate whether comparable manipulations of the exhaust system have taken place in Germany and Europe as well,” Environment Ministry spokesman Andreas Kübler said in Berlin.

German politicians and pundits, meanwhile, expressed shock, outrage and concern over the possible blow to the reputation of German industry, considered the lifeblood of Europe’s largest economy. Germany’s great corporate success, commentators noted, has stemmed from the perception of its world-renown manufacturers as being synonymous not only with quality but also integrity.

“I think it is clear that this is a bad incident and that we are concerned that the rightfully excellent reputation of the German automobile industry and Volkswagen in particular will suffer,” said German Vice Chancellor Sigmar Gabriel.

Thomas Fromm, a commentator in the daily Süddeutsche Zeitung, wrote: “A serious crisis of confidence is looming, but not only for VW. The case could rub off on other German manufacturers.”

Moore is a freelance writer. Faiola reported from Berlin. Stephanie Kirchner in Berlin and Thomas Heath and Peter Whoriskey in Washington contributed to this report.