(Reuters) - A U.S. judge on Monday ruled in favor of a U.S. House of Representatives committee seeking President Donald Trump’s financial records from his accounting firm, dealing an early setback to the Trump administration in its legal battle with Congress.

U.S. District Judge Amit Mehta in Washington also denied a request by Trump to stay his decision pending an appeal.

Last Tuesday Mehta heard oral arguments on whether Mazars LLP must comply with a House of Representatives Oversight Committee subpoena.

Mehta said in Monday’s ruling that the committee “has shown that it is not engaged in a pure fishing expedition for the President’s financial records” and that the Mazars documents might assist Congress in passing laws and performing other core functions.

“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 said.

Mehta said Mazars has seven days to comply with the subpoena.

It was the first time a federal court had waded into the tussle about how far Congress can go in probing Trump and his business affairs.

Trump told reporters the decision was “crazy” and that it would be appealed.

“It’s totally the wrong decision by obviously an Obama-appointed judge,” Trump said.

Trump is refusing to cooperate with a series of investigations on issues ranging from his tax returns and policy decisions to his Washington hotel and his children’s security clearances.

The standoff deepened on Monday when Trump told former White House counsel Don McGahn to defy a subpoena to testify about Special Counsel Robert Mueller’s Russia investigation before a different congressional committee.

Trump’s lawyers have argued that Congress is on a quest to “turn up something that Democrats can use as a political tool against the president now and in the 2020 election.”

The House Oversight Committee claims sweeping investigative power and says it needs Trump’s financial records to examine whether he has conflicts of interest or broke the law by not disentangling himself from his business holdings, as previous presidents did.

FILE PHOTO - U.S. President Donald Trump speaks at the National Association of Realtors' Legislative Meetings & Trade Expo in Washington, U.S., May 17, 2019. REUTERS/Carlos Barria

Lawyers for Trump and the Trump Organization, his company, last month filed a lawsuit to block the committee’s subpoena, saying it exceeded Congress’ constitutional limits.

Mehta was appointed in 2014 by Democratic former President Barack Obama, who was often investigated by Republicans in Congress during his two terms in office.

Mazars has avoided taking sides in the dispute and said it will “comply with all legal obligations.”

The ruling was “a resounding victory for the rule of law,” Elijah Cummings, the House Oversight Committee chairman, said in a statement.

“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,” Cummings said.

A judge in Manhattan will hear arguments on May 22 in a similar lawsuit Trump filed to block subpoenas issued to Deutsche Bank AG and Capital One Financial Corp.

Mehta’s ruling “will probably have considerable weight in similar factual contexts where the House is seeking other records,” said Carl Tobias, a law professor at the University of Richmond.