A federal judge ruled against President Donald Trump on Monday in a financial records dispute with Congress and said lawmakers should get the documents they have subpoenaed. Trump called it a “crazy” decision that his lawyers would appeal.

“We think it’s totally the wrong decision by, obviously, an Obama-appointed judge.”

Of course, his appeal will now be heard by the D.C. Circuit Court of Appeals, which is headed by Chief Judge Merrick Garland, whom former President Barack Obama nominated for the Supreme Court. Garland ultimately was denied his seat when Senate Majority Leader Mitch McConnell, R-Ky., refused to hold a hearing on his nomination.

However, a three-judge panel will hear the appeal, and there’s no guarantee Garland will hear the case.

The ruling by U.S. District Judge Amit Mehta comes amid a widespread effort by the White House and Trump’s attorneys to refuse to cooperate with congressional requests for information and records. Earlier Monday, Trump directed former White House counsel Don McGahn to defy a congressional subpoena that had compelled McGahn, a pivotal figure in special counsel Robert Mueller’s investigation, to testify before the House Judiciary Committee on Tuesday.

In ruling that Trump cannot block the financial records subpoena, Mehta said the Democratic-led House Oversight and Reform Committee had “valid legislative purposes” for its request and that it was not for him “to question whether the Committee’s actions are truly motivated by political considerations.” The committee has said the records will help it consider whether to strengthen ethics and disclosure laws, among other things, said Mehta, who was nominated to the bench by President Barack Obama.

Trump pointed to his Democratic predecessor when he told reporters before leaving the White House for a Monday night rally in Pennsylvania that “we think it’s totally the wrong decision by, obviously, an Obama-appointed judge.”

To the committee chairman, Rep. Elijah Cummings, D-Md., the judge’s decision was a “resounding victory for the rule of law and our constitutional system of checks and balances.”

Trump’s lawyers, in cases from Washington and New York challenging the Democrats’ demands, argued that congressional investigations are legitimate only if there is legislation that might result from them. “There is no possible legislation at the end of this tunnel,” his legal team said.

The White House made the same argument Friday when Treasury Secretary Steven Mnuchin said he would not comply with a congressional subpoena for six years of Trump’s tax returns.

In the New York case, Trump, his business and family want to prevent Deutsche Bank and Capital One from complying with House subpoenas for banking and financial records. A Wednesday court hearing is planned.

In the Washington case, Trump and his business organization are trying to block the subpoena issued in April to Mazars USA, which has provided accounting services to Trump.

Even before the ruling, legal scholars had said Trump’s argument had little merit and that Congress has broad powers to investigate.

Mehta said in his 41-page opinion that there are limits on Congress’s authority to investigate, but those limits “do not substantially constrain Congress.” He said that as long as “Congress investigates on a subject matter on which ‘legislation could be had,'” it is following the Constitution.

Mehta said that was true in this case, pointing to the committee’s memo outlining four areas of investigation, each of which he said Congress could legislate on.

The judge cited the Watergate investigation involving President Richard Nixon and the Whitewater investigation involving President Bill Clinton. He said 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 said.

© The Associated Press. All rights reserved.