Eric H. Holder Jr., the United States attorney general, talked in impassioned tones on Wednesday about Toyota’s behavior in hiding safety defects from the public, calling it “shameful” and a “blatant disregard” for the law. A $1.2 billion criminal penalty, the largest ever for a carmaker in the United States, was imposed.

Mr. Holder said the department’s four-year investigation of Toyota found that the company concealed information about defects from consumers and government officials, putting lives at risk because of faulty parts that caused sudden, unintended acceleration in several of its models.

But Toyota wasn’t the only company on everyone’s mind.

General Motors is now the subject of a Justice Department inquiry over its failure to recall cars with a defect that is linked to 12 deaths. And while Mr. Holder did not address questions about the G.M. inquiry, he said the Toyota case would be a model for its newly vigilant approach to automotive safety.

“Other car companies should not repeat Toyota’s mistake,” Mr. Holder said at a news conference in Washington. “A recall may damage a company’s reputation, but deceiving your customers makes that damage far more lasting.”