A federal judge in Washington D.C. on Monday ruled in favor of the House Oversight Committee's bid to obtain President Donald Trump's financial records from his accounting firm.

U.S. District Judge Amit Mehta, who also denied Trump's request to stay his decision pending an appeal, said Congress was acting within its broad authority to investigate, rejecting arguments from Trump's attorneys who said the panel's probe, and subsequent document demands, served no legislative purpose.

"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.

"Congress plainly views itself as having sweeping authority to investigate illegal conduct of a President, before and after taking office. This court is not prepared to roll back the tide of history," he added.

Oversight Chairman Elijah Cummings called the ruling “a resounding victory for the rule of law and our Constitutional system of checks and balances."

"Congress must have access to the information we need to do our job effectively and efficiently, and we urge the President to stop engaging in this unprecedented cover-up and start complying with the law,” the Maryland Democrat said in a statement.

Trump told reporters on the White House South Lawn, 'We disagree with that ruling. It's crazy."

"It's totally the wrong decision by obviously an Obama-appointed judge," Trump added. Mehta was nominated to his position by President Barack Obama in 2014.

Trump's attorneys filed the lawsuit last month seeking to block the accounting firm, Mazars USA, from complying with a subpoena for years of documents related to the House Oversight Committee's investigation into allegations that Trump inflated or deflated financial statements for potentially improper purposes.

In his ruling, Mehta noted that the subpoena called for Mazars USA "to produce financial records and other documents relating to President Trump personally as well as various associated businesses and entities dating back to 2011—years before he declared his candidacy for office."

"The decision to issue the subpoena came about after the President’s former lawyer and confidant, Michael Cohen, testified before the House Oversight Committee that the President routinely would alter the estimated value of his assets and liabilities on financial statements, depending on the purpose for which a statement was needed," Mehta wrote.

Lawyers for the president maintained the subpoena was politically motivated and not for legislative purposes, and that Mazars USA didn't have to comply with the subpoena.

The judge, who sounded skeptical of that position at a hearing last week, disagreed.

"According to the Oversight Committee, it believes that the requested records will aid its consideration of strengthening ethics and disclosure laws, as well as amending the penalties for violating such laws. The Committee also says that the records will assist in monitoring the President’s compliance with the Foreign Emoluments Clauses. These are facially valid legislative purposes, and it is not for the court to question whether the Committee’s actions are truly motivated by political considerations," the ruling says.

Mehta was also not moved by Trump's contention that only the executive branch of the government can investigate whether a president broke the law, citing the Watergate investigations.

The judge declined Trump's request for a stay, saying Trump's lawyers failed to raise any serious legal questions that would merit one, but noted that the committee had said it wouldn't take steps to enforce the subpoena for seven days after his ruling, which would give Trump's lawyers time to file their expected appeal.