President Trump and House Speaker Nancy Pelosi (D-Calif.) attend a May 15 memorial event for law enforcement officers. (Evan Vucci/AP)

A U.S. judge on Thursday sharply challenged a House lawsuit to block construction of President Trump’s border wall after a senior Justice Department attorney said Congress cannot sue to enforce its constitutional power of the purse and that courts should stay out of political disputes between branches of government.

The Democratic-led House filed suit in Washington on April 5 to prevent work after Speaker Nancy Pelosi (D-Calif.) accused the administration of “stealing from appropriated funds” by seeking to transfer $6.7 billion more for the effort than the $1.375 billion Congress approved, a shift of money from other projects lawmakers authorized.

Trump declared a national emergency in February to redirect mostly military-designated funding for the wall along the U.S.-Mexico border after losing a grueling two-month fight over fully paying for it that prompted a government shutdown.

But over nearly three hours of arguments, U.S. District Judge Trevor N. McFadden of the District said there were few cases to guide how courts should rule on a major test of the constitutional separation of powers, and pressed House general counsel Douglas Letter to point to historical precedent allowing one chamber of Congress to sue the president to settle political differences.

Whether the House has legal standing to sue is “problematic” and a “significant issue in this case,” said McFadden, citing the bedrock legal requirement that a party prove it is being harmed and show that only a court can address it. “Courts are not there to adjudicate just interesting constitutional or political questions between the branches,” he added later.

McFadden did not say when he would rule on the House motion’s to block spending while litigation continued. But he said he expected the outcome to be appealed. . “I’m not sure how much necessarily our views will carry the day for the courts above us,” he said. He added that he did not find binding a 2015 ruling by a federal judge on the D.C. court that the then-GOP-led House could sue the Obama administration for allegedly spending on an Affordable Care Act program that Congress did not approve.

The lawsuit is one of seven nationwide that challenge whether Trump ’s extraordinary invocation of executive powers — to deter what he called “an invasion of drugs and criminals coming into our country” — marked an abuse of presidential authority.

Other lawsuits have been brought by parties that include 20 states, environmental groups, land owners and civil liberties organizations. But the House lawsuit directly raises constitutional arguments from another elected branch of the federal government.

The fight comes as Trump has declared blanket defiance of congressional oversight investigations of his administration, finances and possible obstruction of a Russia inquiry by special counsel Robert S. Mueller III, telling reporters, “We’re fighting all the subpoenas,” and, “These aren’t, like, impartial people. The Democrats are trying to win 2020.”

Pelosi and Senate Minority Leader Charles E. Schumer (D-N.Y.) issued a statement after Trump’s emergency declaration, saying, “This is plainly a power grab by a disappointed president, who has gone outside the bounds of the law to try to get what he failed to achieve in the constitutional legislative process.”

When the House lawsuit over funding for the border wall was announced, Pelosi said, “The President’s action clearly violates the Appropriations Clause by stealing from appropriated funds, an action that was not authorized by constitutional or statutory authority.”

But in court Thursday, Deputy Assistant Attorney General James M. Burnham argued the president was legally transferring money under other laws that Congress has approved, and urged McFadden not to interfere in executive branch decisions over how to secure the country.

“For over 200 years of our Constitution’s history, Congress and the executive branch resolved their political disputes through political means,” Burnham said. In this case, Congress should have passed a law explicitly saying that “no money shall be obligated” in any form to construct a border barrier, he said.

Burnham, a former associate Trump White House counsel, said the nation’s founders would have been “horrified’ and “appalled” at lawmakers trying to get the courts to take their side in such a dispute, “making the president subservient to the courts.”

Going further, Burnham said only in the past 50 years have courts allowed the House or Senate to sue to enforce subpoenas, rulings he argued should be overturned. “The founders were very careful to give the branches what they needed to defend themselves,” he said. “The Constitution nowhere even hints at the possibility of interbranch litigation.”

He also argued the case was premature because the Defense Department has not yet authorized construction to start under the emergency declaration, although he said it could act as soon as next week.

The financing plan for what Trump has called “a big, beautiful wall” includes transferring $600 million collected in enforcement and forfeiture actions by customs and treasury agencies, and transferring from other defense programs $2.5 billion into a Pentagon fund authorized by Congress for installing fences to block drug smuggling at the border.

The plan also could draw on an additional $3.6 billion Congress approved for use by the Pentagon for unanticipated “higher priority items, based on unforeseen military requirements.”

But that spending would violate the Constitution’s appropriations clause, House general counsel Letter countered, which mandates that “no money may be spent unless Congress actually appropriates it.”

Letter argued that Congress had made clear no additional money should go to the border wall, and Trump Chief of Staff Mick Mulvaney publicly said the administration would build it “with or without Congress.” He also said other Pentagon spending provisions block the transfer of unrelated funds for military construction purposes.

“The president in this instance is going to the very heart of our check and balances. We cannot — and our Framers would have stood up and applauded me on this — we cannot have the president appropriating money,” Letter said. He said Burnham’s proposed solution — pass another law — was nonsensical, because Congress did pass a law, which the president flouted. “I’m fairly sure that if you asked any American, ‘Did Congress deny the president the funds he requested?,’ the answer would have to be, ‘Yeah, don’t you know what deny means?”

Letter said that “clearly when the executive and the legislative are at complete loggerhead on what a key issue of the Constitution means . . . the Supreme Court is perfectly comfortable telling us, telling the two branches, here’s what the law means,” Letter said. “. . . And both branches, I believe, have universally followed what the judiciary says.”

The suit asks McFadden, a 2017 Trump appointee who served briefly as a senior Justice Department official, to block the spending of $1 billionin funding already transferred March 25 for the wall and to block any further money transfers for wall construction.

On Friday in Oakland, U.S. District Judge Haywood S. Gilliam Jr., a 2014 appointee of President Barack Obama, heard arguments in a similar lawsuit brought by a coalition of states led by California and the Sierra Club under advisement. Gilliam did not say when he would rule.

Fred Barbash contributed to this report.