Ford Motor Co. on Wednesday agreed to pay a $1.1 million penalty to settle allegations it violated clean air laws at three Detroit-area plants, and spend another $12 million to build a waterborne primer system that cuts down on paint emissions.

The U.S. Environmental Protection Agency (EPA) said in a news release it reached agreement on the allegations with the U.S. Department of Justice and world’s No. 2 automaker.

It covers Wayne Assembly, where the Ford Focus small car is made; Michigan Truck Assembly, which makes the Expedition and Navigator full-size sport utilities; and Dearborn Assembly, where the Mustang is produced.

One third of the $1.1 million penalty will be paid to the United States government; one-third to the Michigan general fund; and one-third to Wayne County.

The EPA alleged that Ford failed to comply with permit requirements and emission limits for volatile organic compounds at all three assembly plants.

As part of the settlement, Ford will install a waterborne primer system at its new Dearborn Assembly operation that will replace a previous solvent-based primer system in the paint guidecoat booth. The waterborne system significantly cuts volatile organic emissions, the EPA said.