A federal judge on Monday ruled in favor of House Democrats in their efforts to obtain President Donald Trump’s financial records, marking the first legal victory for Democrats as the Trump administration stonewalls their attempts at congressional oversight.

“It is not for the court to question whether the Committee’s actions are truly motivated by political considerations.” Judge Amit Mehta wrote in a ruling Monday. “Accordingly, the court will enter judgment in favor of the Oversight Committee.”

President Trump and the Trump Organization filed suit against the Democratic chairman of the House Oversight Committee, Rep. Elijah Cummings, last month, seeking relief from his subpoena request for the president’s financial records.

The court also denied their request for a stay pending appeal.

The president and his legal team decried Democrats’ efforts to obtain Trump’s financial information as an “all-out political war,” in which “subpoenas are their weapon of choice.”

But in his order on Monday, Judge Mehta, an Obama appointee, sided with Democrats, whom he wrote have “facially valid legislative purposes” to obtain information requested in their subpoena of Mazars USA, the president’s former accounting firm.

"It is simply not fathomable that a Constitution that grants Congress the power to remove a President for reasons including criminal behavior would deny Congress the power to investigate him for unlawful conduct — past or present — even without formally opening an impeachment inquiry," Mehta wrote.

Cummings served a subpoena to Mazars USA in April seeking ten years of the president's financial records in an effort to corroborate elements of Trump’s former personal attorney Michael Cohen's testimony before the committee. Cohen claimed that Trump had defrauded insurance companies by misrepresenting the value of his assets.

House Intelligence Committee Chairman Rep. Adam Schiff, a California Democrat whose committee is also seeking information from the Trump administration, reacted to news of the decision, calling it "very important."

“It shows that the courts understand the importance of oversight even if the president does not,” Schiff said.

"Mazars USA will respect the legal process and fully comply with its legal obligations. We believe strongly in the ethical and professional rules and regulations that govern our industry, our work and our client interactions. As a matter of firm policy and professional rules we do not comment on the work we conduct for our clients," Mazars USA spokesperson Jennifer Farrington told ABC News on Monday.

Speaking to reporters as he departed the White House Monday evening, Trump said that he plans to appeal the judge's ruling.

"Yeah, they'll appeal it. They'll appeal it. Sure they'll appeal it," Trump said.

The president "disagreed" with the ruling and slammed the judge for being appointed by Obama.

"We disagree with that ruling. It's crazy because you look at this never happened to any other president. They're trying to get a redo. Trying to get what we used to call in school a do-over and if you look, you know, we had no collusion, we had no obstruction. We had no nothing," Trump said.

"The Democrats were very upset with the Mueller report as perhaps they should be, but, I mean the country is very happy about it because there was never anything like that. They're trying to get a do-over or redo. You can't do that as far as the financials are concerned it's totally the wrong decision by obviously an Obama appointed he was a recent Obama appointed judge," Trump added.

The House Oversight Committee was not immediately available for comment. The Trump Organization and lawyers for President Trump – both plaintiffs in the case – did not immediately respond to request for comment.

ABC News' Ali Pecorin and Katherine Faulders contributed to this report.