WASHINGTON — The Trump administration is seeking an emergency court order to let the government use Pentagon money to build sections of a border wall in Arizona and Texas.

A federal judge in California late last month blocked a White House plan, announced as part of President Donald Trump's declaration of a national emergency, to tap the military's counter-drug budget for money to build wall projects in Yuma and El Paso. The judge agreed with the Sierra Club and other environmental groups, who said in a lawsuit that the construction would produce environmental harm and would amount to spending money without the required approval by Congress.

In seeking an emergency order from the Ninth Circuit Court of Appeals in San Francisco, the Justice Department said if the legal dispute isn't resolved quickly, the government will lose access to the Pentagon funds. A decision from the appeals court by June 17, it said, would still leave enough time to appeal to the U.S. Supreme Court.

The administration said the May 24 order by Federal District Court Judge Haywood Gilliam was flawed for two reasons — because the Pentagon has the authority to transfer funds from one program to another within its budget and because there's no right for private parties to sue over such reprogramming decisions.

And even if such a right to sue did exist, the government argues, the harm the Sierra Club alleges is dwarfed by the need to fight the drug war. "Plaintiff's interests in hiking, birdwatching, and fishing — in two drug-smuggling corridors with deteriorating existing barriers — do not come close to outweighing the harm from interfering with efforts to stop the flow of drugs entering the country."

Judge Gilliam ruled that because Congress considered the administration's request for border wall money and approved only a small part of it, the government could not spend money beyond what was authorized. He also said the money could be shifted to the wall project only for an unforeseen emergency, which the flow of drugs across the border clearly was not.

The Sierra Club lawsuit is one of half a dozen filed over President Trump's invocation of a national emergency to get more money for border wall construction. Late Monday, a federal court threw one of them out — a lawsuit filed by Democrats in the U.S. House of Representatives.

Judge Trevor McFadden said the dispute between the House and the Trump administration was a strictly political one. Because of separation of powers, the judicial branch must stay out of it, he said.

He also found that the members of the House had no authority to sue the White House over how money is spent. The Constitution "does not grant them standing to hale the executive branch into court claiming a dilution of Congress's legislative authority."

For now, however, the order entered by Judge Gilliam remains in effect, and the government cannot spend the Pentagon counter-drug money it identified for wall construction.