(Bloomberg) -- A long-running clash between gasoline and ethanol producers will be before the U.S. Supreme Court on Tuesday, in a case that could cost small oil refineries hundreds of millions of dollars.

At issue is the ability of refineries to win exemptions from 16-year-old U.S. government mandates that they mix renewable fuels into gasoline and diesel.

Under former President Donald Trump, the Environmental Protection Agency let dozens of small refineries off the hook. Though the Biden administration is set to change course, a high court ruling limiting refinery waivers would remove its discretion.

Such a ruling could reverberate for years, ruling out expansive relief for refiners and potentially encouraging investment in the equipment needed to push more renewable fuels into the market.

“We don’t think the Biden administration intends to give out the small refiner exemptions like the Trump administration,” said Height Capital Markets analyst Benjamin Salisbury. “But it would limit their ability to change their mind.”

Under the Renewable Fuel Standard, refiners must either purchase and blend biofuels themselves or buy tradeable credits that track consumption of corn-based ethanol, soy-based biodiesel and other plant-based alternatives. Congress created an out for small refineries that face an “economic hardship” in complying, by empowering the EPA to waive those facilities from meeting the annual quotas.

Refineries that win exemptions can save tens to hundreds of millions dollars annually that they would otherwise spend buying biofuel compliance credits known as renewable identification numbers, or RINs.

Although the EPA initially handed out exemptions automatically, they were eventually curtailed, with fewer than two dozen refineries receiving the waivers annually during former President Barack Obama’s final years in office. Under Trump, the exemptions soared to as many as 35 refineries with waivers in 2017.

Biofuel advocates challenged the surge in federal court, arguing the waivers should be reserved only for refineries that have continuously secured extensions of their initial exemptions. The 10th Circuit Court of Appeals agreed in January 2020, finding the EPA had wrongly exempted refineries owned by HollyFrontier Corp. and CVR Energy Inc.’s Wynnewood Refining Co.

The Supreme Court is now reviewing the 10th Circuit’s ruling that refineries should only be eligible if they initially received waivers and had them continually extended -- an approach under which only a few nationwide would qualify.

A ruling upholding the 10th Circuit would bind the EPA’s power to grant exemptions, with implications for major biofuel producers and refiners, including Renewable Energy Group Inc., Green Plains Inc., Poet LLC and Valero Energy Corp.

President Joe Biden criticized the Trump waivers on the campaign trail, and his administration argued in a brief filed with the Supreme Court that exemptions should be a temporary “bridge to compliance,” not a permanent safety valve.

The impact of the court’s decision may be initially limited, because the Biden administration is expected to issue refinery waivers sparingly despite the high court’s findings. But it could matter if a new president is elected in 2024.

“It will be very important if the small refiners think sometime in the future they’ll have a more friendly administration,” said James Coleman, an energy law professor at Southern Methodist University. “If the Supreme Court agrees with the 10th Circuit here, then that discretion is gone.”

Ethanol and biodiesel makers argue the exemptions have undercut demand, running counter to Congress’ goal of bolstering renewable fuel production. Curtailing waivers could encourage more investments in distributing and blending plant-based fuels, they say.

HollyFrontier and Wynnewood argue the 10th Circuit wrongly adopted a strained reading of federal law that could prompt the closing of some small refineries.

“Congress intended small refinery exemptions to act as a critical safety valve to protect vital refining assets while meeting the obligations of the RFS,” HollyFrontier said in an emailed statement.

Already, the prospect of fewer exemptions has driven up the cost of the RIN credits. RINs tracking ethanol blending have soared 823% since the 10th Circuit ruling, up from just 15.5 cents apiece on Jan. 24, 2020 to $1.43 on Monday. In the same time, RINs tracking biodiesel blending climbed from 41 cents to $1.51 each, a 268% increase.

The case will likely turn on how the justices interpret just a few words in the Renewable Fuel Standard law -- specifically its provision allowing a small refinery to petition the EPA “at any time” for an “extension” of its initial, automatic exemption. Biofuel producers argue Congress intended waivers to be temporary and that the law’s use of the word “extension” inherently means refineries can only qualify if they have an existing exemption to prolong. But refiners counter Congress included the “at any time” phrase because it wanted waivers to be available when necessary.

For now, legal uncertainty is casting a cloud over federal biofuel policy decisions. The EPA hasn’t decided on 46 petitions for waivers from 2019 and 2020 quotas, nor has it set blending targets for 2021.

The case is HollyFrontier Cheyenne Refining, LLC v. Renewable Fuels Association, 20-472.

©2021 Bloomberg L.P.