President Donald Trump was dealt a court loss Monday afternoon from a federal judge he appointed during his first term.

Trump nominated Dabney Friedrich as a United States district judge in 2017 and she was confirmed in November of that year. On Monday, that decision came back to bite him, as Friedrich ruled the Trump administration illegally withheld tens of millions of dollars in funding from the National Endowment for Democracy, or NED, that had been approved by lawmakers in Congress.

NED, which supports activists for democracy in Hong Kong and independent press coverage of Iran, sued the Trump administration for denying it access to the money. The organization said the move left it in "devastating" financial straits and forced it to furlough 75% of its staff.

Friedrich ruled that the defendants in the Trump administration "have likely unlawfully frozen the Endowment's funding."

"The defendants’ justification for its withholding is that reserving the funds 'would achieve the most effective and economical use of the [$95 million] because sufficient funds had already been disbursed to NED for [fiscal year] 2025'; and reservation 'ensures that NED will retain at least [$95 million in] funding in the coming fiscal year,'" Friedrich noted.

She then bluntly smacked down the Trump administration's justification.

"Those assertions are neither reasoned nor rational," she said.