The world’s largest steelmaker has agreed to pay nearly $2 million because of air pollution violations at a Westmoreland County coke plant.

In a settlement filed Wednesday in federal court in Pittsburgh, ArcelorMittal agreed to pay $1.5 million to state and federal regulators, and donate $300,000 to a local charity to implement clean air programs.

David Masur, executive director of PennEnvironment, which negotiated the settlement with the steelmaker, said he believed it was the largest penalty ever reached in a Clean Air Act citizen suit in Pennsylvania.

The agreement follows two years of negotiations after PennEnvironment sued the plant for multiple violations of the Clean Air Act. According to the lawsuit, the plant committed over 226 violations of the facility’s pollution limits for the hazardous gas hydrogen sulfide, failed to install required monitoring equipment, and operated for weeks at a time while a key air pollution controls were out of service.

The company bought the plant in 2008 from Koppers. The plant processes metallurgical coal into coke, a key component of steelmaking. ArcelorMittal re-started the plant in 2014 after several years on ‘hot idle,’ according to the Pennsylvania Department of Environmental Protection (DEP).

“Literally the day it started, complaints started flowing in to the DEP,” said Josh Kratka, an attorney for the National Environmental Law Center, which represented PennEnvironment in the case.

Among those who complained was Viktoryia Maroz, of Donora. Maroz lives downwind of the plant, and says the odors were so bad, she couldn’t sleep.

“There were times where I would call the plant and complain in the middle of the night and complain about the odors,” she said. “I would call them directly.”

She also got in touch with DEP, and the agency’s field staff put an air monitoring device at her house, she said. Maroz said she was hopeful the settlement would mean that the plant would clean up, but said she has yet to see any improvement.

In an emailed statement, the DEP said inspectors had documented more than 120 violations, including for opacity, fugitive dust, bad odor, and other violations.

PennEnvironment was joined in the settlement by the DEP, EPA and U.S. Department of Justice. The agreement calls for the company to pay a $1.5 million penalty, split between the DEP and EPA.

In addition, the plant will install pollution controls and air monitors. One key part of the plan is the installation of a backup desulfurization unit, which will run while the main desulfurization is off-line for maintenance, Masur said .

Masur said the age of the plant — it was built in the 1940s — was part of the problem.

“Because of the old technology and problems at the facility that come with an aged system, and not using best available technology today, they had chronic air pollution problems,” Masur said.

He said the plant had emitted levels of pollution as much as eight times the federal limit, leading to Clean Air Act Violations.

“Those violations add up, there were hundreds and hundreds of them, and it took a lawsuit like this to rein them in,” Masur said.

On top of the penalty, the company will pay $300,000 to the Community Foundation of Westmoreland County for local air improvements. Phil Koch, executive director of the foundation, said that money will go to initiatives like upgrading the emissions systems of diesel school buses to make them run cleaner.

The settlement, which is filed with the U.S. District Court for the Western District of Pennsylvania, will be open for public comment for 30 days.