NEW YORK (Reuters) - The U.S. government may have to require more biofuels to be blended into the country’s fuel supply after a court ruled on Friday that the mandates must be reconsidered, a decision that boosted renewable fuel credits to seven-month highs on financial markets.

The decision sank stock prices of independent refiners PBF Energy and CVR Energy. They, along with others like Philadelphia Energy Solutions, may be forced to purchase more biofuel credits if the U.S. Environmental Protection Agency decides it must raise blending obligations to satisfy the court’s ruling.

Biofuel advocates, including the powerful corn lobby, hailed the decision as a major victory after the Obama Administration set biofuel blending targets starting in 2014 below levels set by a 2007 law.

Renewable fuel credits, known as RINs, surged as high as 89 cents on Friday, up from between 80 and 82.5 cents apiece on Thursday, traders said. On the New York Stock Exchange, PBF Energy shares fell about 2.6 percent and CVR Refining shares were down 4.4 percent.

The U.S. Renewable Fuel Standard (RFS), overseen by the EPA, requires biofuels such as ethanol to be blended into gasoline and diesel. Fuel importers and refiners must blend the renewable fuels or purchase credits from others that have.

The EPA had sought to lower the amount of biofuels that needed to be mixed into fuel. But the U.S. Appeals Court, District of Columbia Circuit said the agency had incorrectly interpreted a provision in the 2005 Energy Policy Act.

Rather than considering how much biofuel supply was available to refiners and importers, the EPA considered how much demand consumers expressed for renewable fuels. That consideration was not allowed under the law, according to the ruling.

“We are currently reviewing the decision,” said an EPA spokesman.

The ruling may force EPA to reconsider the volumes set for 2016. This boosted prices of the biofuels credits as refiners and other fuel companies run through excess inventories of the RINS.

A group of biofuels advocates challenged the EPA’s latest renewable fuel standards after they were released in 2016.

“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, president of the Renewable Fuels Association.