A federal judge on Friday expanded the areas where the Trump administration is barred from building a southern border wall using Defense Department funds.

Judge Haywood Gilliam, of the U.S. District Court of the Northern District of California, expanded a previous order from May blocking Trump from building the wall in parts of Arizona, New Mexico and Texas. The court added four more sections of the wall along the southern border in Arizona and California to the no-build list, and made permanent the previous order.

Administration officials have pushed for alternate ways to fund the wall after Congress denied Trump the over $5 billion he had requested earlier this year. The administration appealed the court's earlier order last month, arguing that building the wall was a top priority for the administration to stop high levels of drug smuggling.

"Another activist Obama appointed judge has just ruled against us on a section of the Southern Wall that is already under construction," Trump tweeted after Gilliam's earlier order. "This is a ruling against Border Security and in favor of crime, drugs and human trafficking. We are asking for an expedited appeal!"

Gilliam noted in his decision that using defense funding for the wall eschews Congress' intent in denying Trump's desired funding, and that the administration's policy priorities cannot justify bypassing Congress' authority.

"Defendants’ position on these factors boils down to an argument that the Court should not enjoin conduct found to be unlawful because the ends justify the mean," Gilliam wrote. "No case supports this principle."

Congress offered Trump $1.4 billion for border security after a prolonged standoff between the White House and lawmakers, prompting the president to declare a national emergency to force funding for the wall. Several states and the Sierra Club sued Trump in response, arguing that the president was violating Congress' constitutional power of the purse.

Story continues

Gloria Smith, managing attorney at the Sierra Club, applauded the court's Friday decision in a news release, saying it protected "our Constitution, communities, and the environment today."

“We've seen the damage that the ever-expanding border wall has inflicted on communities and the environment for decades," Smith said in the statement, issued by the American Civil Liberties Union on behalf of the Sierra Club. "Walls divide neighborhoods, worsen dangerous flooding, destroy lands and wildlife, and waste resources that should instead be used on the infrastructure these communities truly need.”

California Attorney General Xavier Becerra also praised the court's decision, saying in a statement Friday: "All President Trump has succeeded in building is a constitutional crisis, threatening the immediate harm to our state."

Becerra led a group of states in suing Trump in February to stop the construction of the border wall. Gilliam's Friday actions block portions of the wall that were slated to be built in California around El Centro.

CORRECTION: This article has been updated to correct the date California sued the Trump administration.