WASHINGTON (AP) — The Trump administration was handed a win by a federal appeals court earlier this week in its effort to freeze billions of dollars and terminate contracts for nonprofits to run a “green bank” aimed at financing climate-friendly projects.

The head of the Environmental Protection Agency had blasted the Biden-era program as a waste of taxpayer money, tried to claw back funding that had already been distributed and accused the nonprofits of mismanagement — misuse accusations that Justice Department lawyers did not back up in court.

The decision by the 2-1 majority on the U.S. Court of Appeals for the District of Columbia Circuit finds that federal officials have broad latitude to cancel funds that have been appropriated by Congress without facing allegations in federal district court that they broke the law.

A dissent said the outcome was a loss not just for the five green bank groups who sued the EPA, but for the authority of Congress to write policy and maintain its traditional power of the purse.

In an opinion written by Judge Neomi Rao, the appeals court said the dispute should be heard in a federal claims court that considers contract disputes.

“In sum, district courts have no jurisdiction to hear claims that the federal government terminated a grant agreement arbitrarily or with impunity. Claims of arbitrary grant termination are essentially contractual,” Rao wrote in a decision supported by Judge Gregory Katsas.

The green bank groups said the federal claims court is limited to awarding possible monetary damages. The groups were seeking an order allowing them immediate access to their funds, which total about $16 billion.

EPA press secretary Brigit Hirsch said in a statement that the decision reaffirmed the EPA’s “duty to be an exceptional steward of taxpayer dollars.”

“It’s fantastic to see reason prevail in the court system,” she said.

A lower court had previously said the EPA couldn’t support Administrator Lee Zeldin’s accusations of wrongdoing and that the nonprofits should not have their contracts terminated and must have access to certain funding that had been frozen.

The majority ruling this week overturned that decision, although the order won’t go into effect immediately to allow for an opportunity to appeal.

The Greenhouse Gas Reduction Fund, commonly referred to as a “green bank,” was authorized by the 2022 Inflation Reduction Act, the climate law approved by congressional Democrats.

Zeldin quickly made the bank a target, characterizing the billions in grants as a “gold bar” scheme marred by conflicts of interest and potential fraud.

In terminating the grants, Zeldin cited a journalist’s undercover video made late last year that showed a former EPA employee saying the agency was throwing “gold bars off the Titanic” — presumably a reference to spending before the end of Biden’s term.