Oil and gas giant ExxonMobil has agreed to spend more than $300 million to settle air pollution allegations.

The Environmental Protection Agency announced the settlementTuesday. The agency alleged the company has violated air pollution rules since the mid-2000s at its petrochemical plants in Baytown, Beaumont and Mont Belvieu in Texas, and in Baton Rouge, Louisiana.

Under the agreement, the company will pay a $2.5 million fine, and install about $300 million worth of pollution controls and monitoring equipment.

“We will be enforcing environmental laws in this administration,” said Patrick Traylor, deputy assistant administrator at the EPA.

Traylor said the pollution in question came from flares that burn off waste gas.

“We’ve alleged that the company modified those facilities in a way that increased the amount of air pollution from those flares without obtaining required Clean Air Act permits,” he said.

ExxonMobil still denies it violated any rules.

Luke Metzger, with Environment Texas, called it a “very good settlement,” though he said the company could pay more.

“They certainly have the resources to pay a higher penalty,” he said. “They very likely profited significantly by failing to reduce this pollution earlier and follow the law.”

The plant upgrades will include flare gas recovery systems and benzene monitors installed on some of the plants’ fences.