A federal judge in Washington, D.C., has ruled President Donald Trump's longtime accounting firm must turn over years of his financial records to the U.S. House of Representatives, upholding a Congressional subpoena that demanded those documents.

The ruling from U.S. District Judge Amit Mehta delivered a major blow to Trump in what marks the first time a federal court has waded into the continued standoff between the president and Democratic lawmakers. Lawyers for Trump filed the lawsuit last month seeking to block his accountant, Mazars USA LLP, from complying with a House Oversight committee's subpoena.

“Courts have grappled for more than a century with the question of the scope of Congress's investigative power. The binding principle that emerges from these judicial decisions is that courts must presume Congress is acting in furtherance of its constitutional responsibility to legislate and must defer to congressional judgments about what Congress needs to carry out that purpose. To be sure, there are limits on Congress's investigative authority. But those limits do not substantially constrain Congress. So long as Congress investigates on a subject matter on which 'legislation could be had,' Congress acts as contemplated by Article I of the Constitution,” Mehta wrote.

“Applying those principles here compels the conclusion that President Trump cannot block the subpoena to Mazars,” the judge added.

Mehta noted the committee's contention that the subpoenaed materials would aid its consideration of “strengthening ethics and disclosure laws,” along with its monitoring of Trump's compliance with the Constitution's anti-corruption 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,” Mehta said.

The ruling is expected to be appealed by Trump's attorneys, teeing up a fight that could go up to the U.S. Supreme Court. Mehta on Monday refused to put his ruling on hold pending any appeal from Trump.

Consovoy McCarthy partners William Consovoy and Patrick Strawbridge represent the president in his personal capacity; Michael Best & Friedrich partner Stefan Passantino, a former Deputy White House counsel, represents the Trump organization and other Trump-related business entities which are also involved in the lawsuit.

Still, Mehta's ruling delivers a key win to the Democratic majority in the U.S. House. The subpoena is just one of many the House has issued since Democrats took control of the chamber in January. The Trump administration has resisted those demands, setting up protracted court tussles between the two branches on multiple fronts.

Rep. Elijah Cummings, D-Maryland, the chairman of the House oversight committee, called Mehta's ruling a “resounding victory for the rule of law and our Constitutional system of checks and balances.”

“The court recognized the basic, but crucial fact that Congress has authority to conduct investigations as part of our core function under the Constitution,” Cummings said. He added: “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.”

In court papers and in a hearing last week, Trump's lawyers have contended the subpoena is unconstitutional because it isn't supported by a “legitimate legislative purpose.” In a brief, they argued that the subpoena essentially amounted to a harassment of Trump, one of many efforts by Democratic lawmakers to peer into Trump's secretive financial records.

“At best, the Oversight Committee seeks these documents so it can conduct law-enforcement activities that the Supreme Court has held are reserved to the other branches. More likely, though, the Committee wants to collect and 'expose' the President's financial documents 'for the sake of exposure,'” Consovoy wrote in a filing last month. “That purpose is likewise illegitimate and thus provides no constitutional footing for the subpoena.”

House general counsel Douglas Letter counters that courts have long recognized Congress' broad investigative authority.

“[T]he Committee is actually investigating the numerous and serious constitutional, conflict of interest, and ethical questions raised by the personal financial holdings of Trump, even as he serves as President, as well as those of other high-ranking government officials,” Letter responded in a brief earlier this month.

Cummings issued the subpoena to Trump's accounting firm last month. The subpoena came after Michael Cohen, the president's former personal attorney and self-proclaimed “fixer,” testified to Congress earlier this year that Trump previously fudged his financial statements.

Mazars, represented by the law firm Blank Rome, did not take a legal position in the case.

Mehta's order is posted below: