Harley-Davidson will pay $12 million for selling a device that enabled its iconic motorcycles to go faster while spewing more harmful pollutants, the Environmental Protection Agency said Thursday.

"This settlement immediately stops the sale of illegal aftermarket defeat devices used on public roads that threaten the air we breathe," said Cynthia Giles, EPA's enforcement chief. Under the agreement, she said Harley-Davidson is taking "important steps to buy back the 'super tuners' from their dealers and destroy them, while funding projects to mitigate the pollution they caused."

The company will pay $12 million in fines for the pollution violations and spend an additional $3 million to replace conventional woodstoves with cleaner-burning stoves in local communities.

"Given Harley-Davidson's prominence in the industry, this is a very significant step toward our goal of stopping the sale of illegal aftermarket defeat devices that cause harmful pollution on our roads and in our communities," said Assistant Attorney General John Cruden, the Justice Department's environmental division chief. "Anyone else who manufactures, sells or installs these types of illegal products should take heed of Harley-Davidson's corrective actions and immediately stop violating the law."

The government's complaint and subsequent settlement said Harley-Davidson built and sold nearly 340,000 "illegal devices," called "super tuners," which caused the bikes to emit more pollutants than the company had told EPA.

The EPA said the super tuners were sold to motorcycle owners after their initial purchase of a Harley-Davidson motorcycle. The aftermarket devices altered the bikes' emissions controls, which is illegal under the Clean Air Act.

The agency also said that the company manufactured more than 12,000 motorcycles not certified by the EPA to meet federal emission standards.