The U.S. Supreme Court on Friday bolstered a bid by small oil refineries to win exemptions from a federal law requiring increasing levels of ethanol and other renewable fuels to be blended into their products, a major setback for biofuel producers.

The 6-3 ruling overturned a lower court decision that had faulted the U.S. Environmental Protection Agency for giving refineries in Wyoming, Utah and Oklahoma extensions on waivers from renewable fuel standard (RFS) requirements under a law called the Clean Air Act even though the companies' prior exemptions had expired.

The case involved exemptions given to units of HollyFrontier Corp and CVR Energy Inc.

In ruling in favor of the refineries, conservative Justice Neil Gorsuch, writing for the court, compared the extensions at issue in this case to those granted in everyday life, such as to a student who needs more time for a term paper even though the deadline had passed, or a contract whose terms had expired.

"It is entirely natural - and consistent with ordinary usage - to seek an 'extension' of time even after some time lapse," Gorsuch said.

Newsletter signup for email alerts

In a dissent, conservative Justice Amy Coney Barrett, joined by liberal justices Sonia Sotomayor and Elena Kagan, faulted the majority's interpretation of the word "extend." The "EPA cannot 'extend' an exemption that a refinery no longer has," Barrett wrote.

President Joe Biden's administration has been considering ways to provide relief to U.S. oil refiners from biofuel blending mandates.

The case reflected a long-running dispute between the oil and corn industries. The legal battle focused on changes made in 2005 and 2007 to the Clean Air Act to require biofuel quotas in U.S. gasoline and diesel products - intended to reduce dependence on foreign oil and support fossil fuel alternatives.

Under program, refiners must blend billions of gallons of biofuels such as ethanol into their fuel or buy compliance credits, known as RINs, from those that do. U.S. renewable fuel credits <RIN-D6-US> fell on the news, trading at $1.55 cents each, down from $1.65 each on Thursday.

U.S. gasoline and diesel futures plunged about 3% immediately following the news, but have since eased losses.

States backing the refineries included Wyoming. Those backing biofuels included Iowa. Both sides cited economic threats to their rural economies posed by the litigation.

HollyFrontier Corp said in a statement, "We are pleased that our longstanding arguments were today validated by the Supreme Court." HollyFrontier urged the EPA to "immediately take action to make the RFS a workable program for U.S. refiners and consumers."

American Fuel & Petrochemical Manufacturers President Chet Thompson said the renewable fuel standard "is hurting consumers and jeopardizing the viability of refineries across the country, as well as the jobs and communities they support."

Iowa Renewable Fuels Association Executive Director Monte Shaw said his group is "extremely disappointed" with the ruling but noted that the lower court had faulted the EPA's decisions on other grounds as well.

"We fully expect the Biden EPA ... to deny the vast majority of RFS exemption extension requests that are pending or that will be submitted in the future," Shaw said.

Renewable fuel groups said that an increase in waivers during Republican former President Donald Trump's administration had undercut the demand for their products by billions of dollars.

Small refineries were exempt until 2011 to account for any "disproportionate economic hardship" they would endure by complying with volume requirements for ethanol and other biofuels. But the EPA was allowed to extend those exemptions for certain periods.

At issue in the case was whether the EPA impermissibly exempted units of HollyFrontier and CVR Energy in 2017 and 2018 when they had not received continuous prior extensions of an initial exemption.

Several biofuel producer groups including the Renewable Fuels Association challenged the waivers. The Denver-based 10th U.S. Circuit Court of Appeals last year found that the EPA had exceeded its authority "because there was nothing for the agency to 'extend.'"

(Reporting by Andrew Chung in New York; Additional reporting by Stephanie Kelly; Editing by Will Dunham)