Washington CNN  — 

A federal judge in Washington on Monday denied a request by House Democrats to block President Donald Trump from transferring funds from appropriated accounts to construct his wall, a setback for Democrats seeking to use the judicial system to fight the White House.

Judge Trevor McFadden said the House lacks standing to bring the challenge and also he does not believe the court should step into the fight between the President and Congress.

“The Court declines to take sides in this fight between the House and the President,” McFadden wrote.

“This case presents a close question about the appropriate role of the Judiciary in resolving disputes between the other two branches of the Federal Government. To be clear, the court does not imply that Congress may never sue the Executive to protect its powers,” he added.

It’s one of the first times in the numerous court battles between the Democratic-controlled House of Representatives and Trump’s administration that a federal judge has sided with the administration over lawmakers.

Several House committees received favorable rulings last month from federal judges as they subpoena financial records from Trump’s accounting firm and from Deutsche Bank and Capital One as part of Democratic-led investigations.

McFadden’s decision to effectively kill the House effort to stop the border wall comes as the White House and its critics clash over immigration policy on the US-Mexico border. A judge in California overseeing a separate federal case paused some funding that was set to go toward the wall last month. Border communities and The Sierra Club will continue to challenge the constitutionality of Trump’s funding of the wall in that lawsuit.

At the same time, public attention has turned to crowded conditions in border detention centers while Trump has called for tougher restrictions.

The ruling will likely not impact the other lawsuits by House Democrats or states against the Trump administration or various legal efforts to block border wall construction. It was based specifically on the idea of standing – simply whether the House could show injury and could sue.

Lawmakers, McFadden wrote, have more options than the court system to fight the President’s proposals.

“Congress has several political arrows in its quiver to counter perceived threats to its sphere of power,” he wrote. “These tools show that this lawsuit is not a last resort for the House. And this fact is also exemplified by the many other cases across the country challenging the administration’s planned construction of the border wall.”

McFadden, a Trump appointee, held a nearly three-hour hearing on the matter last month.

He also said the ruling doesn’t mean Democrats need to shy away from challenging the White House in court.

“This case presents a close question about the appropriate role of the Judiciary in resolving disputes between the other two branches of the Federal Government. To be clear, the court does not imply that Congress may never sue the Executive to protect its powers,” he wrote.

Earlier this year, the Democratic-led House joined several organizations in filing a lawsuit against the President’s national emergency declaration.

The lawsuit argues Trump’s choice to move funds for the wall violated the Appropriations Clause of the Constitution, which gives Congress power over the designation of federal spending. It asks McFadden to block spending of money transferred for the wall in addition to future transfers.

The suit received notable support from former members of Congress and former House general counsels from both sides of the aisle.

A bipartisan group of more than 100 former House members signed an amicus brief that stated, “Rarely in our Nation’s history has the Executive Branch launched such an assault on Congress’s exclusive legislative powers.”

“Without action by this Court to prevent the Administration’s usurpation of congressional authority, the unchecked expansion of the Executive’s power at the expense of the Legislative Branch will threaten our democracy,” the brief said.

The Department of Justice praised the decision.

“The Court rightly ruled that the House of Representatives cannot ask the judiciary to take its side in political disputes and cannot use federal courts to accomplish through litigation what it cannot achieve using the tools the Constitution gives to Congress,” a department spokesperson said in a statement. “The Department looks forward to continuing to defend the Administration’s lawful actions to address the crisis at the southern border.”

This story has been updated.

CNN’s Kate Sullivan contributed to this report.