DALLAS (AP) -- Federal and state environmental officials said Wednesday that they've reached an agreement on portions of the Texas clean air plan that for years have been points of contention.

The Texas Commission on Environmental Quality and the U.S. Environmental Protection Agency said the conditional agreement on state permits will allow some operating flexibility to major air-pollution sources, such as oil refineries.

'We are pleased that the TCEQ and EPA have been able to reach an agreement for EPA to propose conditional approval of the Texas flexible permit program, and that the EPA now understands why the program is legal and effective,' TCEQ Chairman Bryan Shaw said in a statement.

The deal comes after years of bitter bickering between the federal and state agencies over environmental regulations. The disagreement peaked almost four years ago when the EPA overturned a long-term flexible permitting program, saying it did not meet federal clean air rules. The move forced more than 100 industries, including some of the nation's largest refineries, to work directly with the EPA to get new operating papers.

The Texas agency challenged in court the EPA's 2010 decision to overturn the state program, which also allowed plants to operate under an emissions 'umbrella' but did not separately detail pollution from different sources.

In 2012, a divided 5th U.S. Circuit Court of Appeals panel ruled that the EPA had violated the Clean Air Act by rejecting the program.

The agreement would require continuous monitoring of separate operating units under a general cap of emissions.

Although the agreement allows flexibility, it was not clear immediately what overall standards were agreed to. The state agency's governing commission will consider rules to address the requirements for EPA approval Feb. 12.

The deal drew mixed reviews from environmental watchdogs.

'We were expecting this, but it's still disappointing. EPA's decision is a victory for Texas air polluters and a loss for public health,' said Ilan Levin, associate director of the Environmental Integrity Project. 'This flexible permit program has a long history of abuse, and a lot of the damage is already done.'

However, Neil Carman, clean air program director of the Lone Star Chapter of the Sierra Club, sees the EPA as the victor in the deal.

'The EPA has already addressed the illegal flexible permits,' he said. 'The EPA has already gotten the offending industries to get new permits.'

Furthermore, TCEQ warnings that tighter regulations would close refineries proved to be untrue, Carman said.