Texas environmental groups have scored a major victory in a six-year legal battle with the world’s largest oil company.

Environment Texas and the Sierra Club sued ExxonMobil in 2010, accusing the Irving-based energy giant of spewing far more pollution into the air from its massive Baytown complex than is allowed by federal and state law.

Four years later, U.S. District Judge David Hittner found that only a tiny fraction of ExxonMobil's emissions events were bad enough to warrant legal action — and handed down no penalties. The environmental groups appealed the decision to the conservative-leaning U.S. 5th Circuit Court of Appeals in New Orleans, which is hardly known for championing liberal causes.

But on Friday, the court's three-judge panel vacated Hittner’s ruling and sent the case back to him “for assessment of penalties based on the correct number of actionable violations.”

In a 40-page opinion, the judges said the district court “abused its discretion in declining to impose any penalties, issue a declaratory judgment or grant injunctive relief in remediation of the violations at issue.”

Exxon's massive Baytown complex, which spans five square miles, contains an oil refinery and two petrochemical plants. The company, which has argued in the case that it is allowed to emit excess pollution during exceptional events, said Tuesday it is still analyzing the court's decision.

"We are confident that any remaining issues can be addressed in a manner consistent with the appellate court’s confirmation of the district court’s findings that the Baytown complex has operated reasonably and in good faith," Todd Spitler, the company's media adviser, said in an email.

Describing the lawsuit as “one of the biggest citizen suits ever,” Environment Texas Director Luke Metzger said Tuesday that “having it completely validated by the 5th Circuit is huge.”

“Hittner is going to have to issue some pretty major penalties against Exxon,” he said, noting that the 5th Circuit found that Exxon reaped $11.7 million in economic benefits by delaying capital investments needed to avoid those types of emissions events.

The panel's ruling “reaffirms that these upset emissions are violations of [air] permits, unlike what Exxon has argued,” Metzger said, and “reinforces the right of citizens to file these suits and hold companies accountable.”

The group planned a news conference Tuesday afternoon outside the federal courthouse in Houston, where Hittner is based.

Friday’s decision seems striking given the 5th Circuit’s conservative reputation: Ten of the 15 judges serving on the court were appointed by a Republican president.

But two of the three judges on the panel that handed down the ruling — Fortunato Benavides and James Dennis — were appointed by Bill Clinton, a Democrat. The third, Leslie Southwick, is a George W. Bush appointee.

The case is one of several the environmental groups have brought against the industry in recent years over rogue air emissions. Their decision to sue stems from what they say is inaction by environmental regulators at the federal and state level.

Settlements with Shell's Deer Park refinery and chemical plants and Chevron Phillips' Baytown chemical plant resulted in nearly $8 million in penalties and a sizable reduction in air pollution, the groups noted in a news release Tuesday.

Jim Malewitz contributed reporting.

Disclosure: ExxonMobil has been a financial supporter of The Texas Tribune. A complete list of Tribune donors and sponsors can be viewed here.