A federal appeals court handed a win to President Donald Trump in his effort to freeze foreign aid passed by Congress, reported The New York Times.

But buried in the ruling is a way things could still fall apart for the president.

According to the report, the Court of Appeals for the D.C. Circuit, "cleared the way on Wednesday for the Trump administration to continue refusing to spend billions of dollars in foreign aid, finding that aid organizations that had sued to recover the money lacked the legal right to bring the challenge," ruling 2-1 in a move that "handed the White House a significant legal victory."

Since taking office, Trump and his associates have openly defied the Impoundment Control Act, a 1970s law that prohibits the president from refusing to spend money that Congress appropriated.

However, the court's decision came with an asterisk — they did not actually rule on the merits of whether Trump violated the law.

The court "ruled that under the Impoundment Control Act of 1974, only the Government Accountability Office, which serves as Congress's independent watchdog, could challenge the president’s efforts to withhold foreign aid funding," said the report. "The panel found that groups that receive government funding — in this instance, a number of global health nonprofits — do not have cause to challenge Mr. Trump’s funding cuts."

However, this comes as the Trump administration, through its Department of Government Efficiency task force, has tried to forcibly audit GAO, even though it is answerable strictly to Congress and not the executive branch.

Trump's termination of foreign aid programs has been a major push since he took office. The U.S. Agency for International Development (USAIhas been dismantled and the few surviving functions rolled into the State Department.