HOUSTON (Reuters) - A federal judge ruled on Wednesday that ExxonMobil Corp should pay a $19.95 million penalty for pollution from its Baytown, Texas, refining and chemical plant complex between 2005 and 2013.

U.S. District Court Judge David Hittner issued the ruling in a citizen lawsuit brought under the U.S. Clean Air Act by two environmental groups, Environment Texas and the Sierra Club.

Environment Texas welcomed the decision in the long-running suit, which was first filed in 2010.

“We think it might be the largest citizen suit penalty in U.S. history,” said Luke Metzger, director of Environment Texas. “It definitely means it pays not to pollute.”

Exxon said it would consider its legal options and may appeal the ruling.

“We disagree with the court’s decision and the award of any penalty,” Exxon spokesman Todd Spitler said in an emailed statement. “As the court expressed in its decision, ExxonMobil’s full compliance history and good faith efforts to comply weigh against assessing any penalty.”

The suit was filed under a provision of the Clean Air Act that allows citizens to sue when regulators have failed to stop pollution. The two groups had contended the penalty could run as high as $573 million, but had only sought $41 million.

In a 101-page decision, Hittner ruled there had been 16,386 days of violations and 10 million pounds (4.5 million kg) of pollutants had been released in violation of operating permits issued to Exxon for the Baytown complex.

“The court finds given the number of days of violations and the quantitative amount of emissions released as a result, the seriousness factor weighs in favor of the assessment of a penalty,” he wrote.

The decision comes about a year after the Fifth U.S. Circuit Court of Appeals determined Hittner had errored in a 2014 ruling assessing Exxon’s liability for pollution from the refinery, chemical plant and olefins plant in the Baytown complex in the esatern suburbs of Houston.

The Fifth Circuit Court sent the case back to Hittner to reassess Exxon’s liability.

The Baytown complex, which includes the second largest refinery in the United States, is regulated by the Texas Commission on Environmental Quality (TCEQ), which had fined Exxon $1.4 million for pollution. Hittner deducted that amount in determining the penalty.

The penalty will be paid to the federal government. Hittner said Exxon was liable for legal fees incurred by the two environmental groups.