The Trump administration may have to reconsider its proposal from earlier this month to curb biofuel use after a U.S. appeals court in Washington ruled that the Environmental Protection Agency doesn’t have the authority to cut quotas while citing inadequate domestic supply.

Issued Friday, the unanimous ruling by a three-judge panel comes amid conflicting legal challenges to actions taken by the EPA. Some factions claim the agency set renewable fuel requirements too high, while others said they’re too low. Shares of ethanol producers rose on the news while refinery stocks declined.

U.S. Circuit Judge Brett Kavanaugh wrote that EPA isn’t allowed “to consider the volume of renewable fuel that is available to ultimate consumers or the demand-side constraints that affect the consumption of renewable fuel by consumers.”

The ethanol industry hailed the court’s move as a victory. Earlier this month, the Trump administration issued a proposal that for the first time would cut the amount of renewables that must be blended into the fuel supply under a 12-year-old law known as the Renewable Fuel Standard.

The court ruling is a blow to oil refiners, including billionaire Carl Icahn, who have argued that there are constraints to blending the fuels into petroleum. The American Petroleum Institute said in a statement it was “disappointed” with the court’s decision, which the trade group said highlighted the need for congressional action to reform the renewable fuel standard — a move congressional analysts have said is unlikely to happen.

“We are still reviewing the decision, but the fact the court has affirmed our position that EPA abused its general waiver authority by including factors such as demand and infrastructure in a waiver intended to be based solely on available supply is a great victory for consumers and the RFS program,” said Bob Dinneen, chief executive officer of the Renewable Fuels Association, an ethanol industry trade group.

The targets that the agency set for this year and proposed for 2018 won’t be affected by the court decision, EPA spokeswoman Liz Bowman said in an email. The EPA didn’t base either proposal on its waiver authority, she said.

“Furthermore, today’s decision upheld a number of methodologies and approaches that EPA used in setting the amount of renewable fuels that refiners and importers are required to use,” Bowman said.

In a July 5 statement, the agency, which administers the program, said that the proposal was “consistent with market realities focused on actual production and consumer demand while being cognizant of the challenges that exist in bringing advanced biofuels into the marketplace.”

“This is pretty huge,” said Gene Gebolys, CEO of biofuel producer World Energy Alternatives LLC. “This gives the Trump administration clear guidance on what the legislative branch intended when they passed the law and what the judicial branch meant when they upheld the law.”

Green Plains Inc., one of the biggest U.S. ethanol producers, rose 1.8 percent to $19.80 in New York, the highest price since July 17. CVR Energy Inc., an independent oil refiner that counts Carl Icahn as its biggest investor, slumped 2.9 percent, to the lowest since April 20.

Growth Energy, a coalition of biofuel producers, called the decision “a major win for consumers.”

“We’re very pleased with the court’s ruling, which restores Congressional intent and will ensure that renewable fuels continue to play a growing and important role in America’s fuel mix,” Growth Energy Chief Executive Officer Emily Skor said in a statement. “We appreciate the court recognizing the value of the RFS, and we look forward to working with the EPA to make sure that America’s biofuel targets reflect the goals set down in law.”

The Biotechnology Innovation Organization, which represents companies such as DuPont Co. and Novozymes A/S also applauded the move.

“BIO and its members are pleased that the Court agreed with us that EPA’s flawed methodology would have allowed the oil industry to control the volumes of renewable fuels offered to consumers,” BIO Chief Executive Officer Jim Greenwood said in a statement. “BIO has consistently said that the RFS statute does not allow EPA to rely on demand-side factors under the oil industry’s control as a basis for setting annual volumes.”

EPA Argument

The court heard the argument on April 24. The case dealt with Obama-era EPA actions to cut quotas for ethanol and other biofuels for the years 2014, 2015 and 2016 below statutory levels, reducing totals set forth in 2007 legislation, with the regulator taking the position it had the power to do so under a provision allowing it to adapt to a production shortfall.

There was no shortfall, but the EPA argued that “production” could include the fact that the market couldn’t absorb the additional fuel, government lawyer Samara Spence told the court.

The EPA “misunderstood its assignment under the mandate,” former U.S. Solicitor General Seth Waxman countered, arguing on behalf of biofuels proponent Americans for Clean Energy, adding that the agency “screwed up.”

“The salient point here is that EPA agrees there is more than adequate supply,” Waxman said.

From the bench, Kavanaugh indicated he agreed.

“I understand the difficulty EPA is in here, but the statute doesn’t seem to give EPA the authority to fix everything that is not working right,” he told Spence, the government’s attorney. “If this thing is totally screwed up, Congress should fix it.”

Valero Energy Corp., the biggest independent U.S. refiner and one of the largest biofuel producers, said the EPA still has other factors it can consider to adjust volume targets and that the ruling may serve to advance its push for the agency to change who is obligated to show compliance with the program.

“Valero regards this decision as a strong signal that EPA must take definitive action on the point of obligation issue,” Lillian Riojas, a spokeswoman for Valero wrote in an emailed statement.

Joining in the opinion were U.S. Circuit Judges Patricia Ann Millett and Janice Rogers Brown.