Harley-Davidson agreed to pay a $12 million civil fine and stop selling illegal after-market devices that cause its motorcycles to emit too much pollution, the U.S. Justice Department said on Thursday.
The settlement resolves government allegations that Harley sold roughly 340,000 “super tuners” enabling motorcycles since 2008 to pollute the air at levels greater than what the Milwaukee-based company certified to the U.S. Environmental Protection Agency.
According to the government, the sale of such “defeat devices” violates the federal Clean Air Act. Harley was also accused of selling more than 12,600 motorcycles that were not covered by an EPA certification governing clean air compliance.
The settlement calls for Harley to stop selling the super tuners by Aug. 23, and buy back and destroy all such tuners in stock at its dealerships. EPA said the modified settings increase power and performance, but also increase the motorcycles’ emissions of hydrocarbons and nitrogen oxides.
Harley (HOG) will also spend $3 million on an unrelated project to reduce air pollution, the Justice Department said.
“Given Harley-Davidson’s prominence in the industry, this is a very significant step toward our goal of stopping the sale of illegal after-market defeat devices that cause harmful pollution on our roads and in our communities,” John Cruden, head of the Justice Department’s environmental and natural resources division, said in a statement.
The announcement comes amid greater scrutiny on emissions and “defeat devices” by U.S. regulators after Volkswagen (VLKAY) admitted to using illegal software to evade U.S. emissions standards in nearly 600,000 U.S. vehicles.
“This settlement immediately stops the sale of illegal after-market defeat devices used on public roads that threaten the air we breathe,” said Cynthia Giles, assistant administrator for EPA’s Office of Enforcement and Compliance Assurance.
Harley must obtain a certification from the California Air Resources Board for any tuners it sells in the United States in the future. For any super tuners that Harley-Davidson sells outside the United States in the future, it must label them as not for use in the United States.
Get Data Sheet, Fortune’s technology newsletter.
EPA said it discovered the violations through a routine inspection and information Harley-Davidson submitted.
In a separate statement, the company said it has sold the product for more then 20 years under an accepted regulatory approach that permitted the sale of competition-only parts and said it believed it was legal to use in race conditions in the United States.
Harley said it disagreed with the EPA’s view of the case, but settled without admitting liability in what it called a “good faith compromise.”
In late morning trading, Harley shares were down 90 cents at $53.58, or 1.7%. They had earlier fallen as much as 8% after news of the allegations had surfaced in a U.S. lawsuit filed in Washington, but before the settlement was announced.