The Trump administration can't use money previously allocated to the Defense Department to instead fund the border wall, a federal judge ruled Friday in a temporary injunction. Oakland, California-based U.S. District Court Judge Haywood Gilliam ruled the Trump administration could not move $1 billion that was previously appropriated for other areas within the Defense Department to fund the border wall.

The $1 billion had already been appropriated to pay for military personnel for counterdrug measures, and Gilliam said it was "unconstitutional" to move funds for what is described as "unforseen" requests. This ruling thus does not prevent the Trump administration from moving the $1 billion from elsewhere.

Gilliam, an Obama-appointee, specifically wrote in the ruling he is not taking issue with the political arguments with the border wall. At the end of the government shutdown, Congress appropriated only $1.35 of funding for the border wall in Texas' Rio Grande Valley. The White House has said it has found $8.1 billion that could be used.

Get Breaking News Delivered to Your Inbox

Another $1.5 billion that has been allocated from Defense Department funds could also be at risk under the ruling.

The plaintiffs in the case -- The Sierra Club and the Southern Border Communities Coalition (SBCC), represented by the American Civil Liberties Union -- celebrated the ruling as a win.

"This order is a win for our system of checks and balances, the rule of law, and border communities," Dror Ladin, staff attorney with the ACLU's National Security Project, said in a statement.

Kenneth Rapuano, an assistant secretary of defense, said in court filings last month that construction on parts of the border wall in Yuma, Arizona and in New Mexico as soon as May 25.