The 56-page ruling blocked the administration from moving forward, explaining that Trump could not disburse the funds without congressional approval.
Late Friday a federal judge blocked U.S. President Donald Trump from using US$1 billion in funds from the country’s Defense Department to build two sections of the long-promised U.S.-Mexico border wall.
"This order is a win for our system of checks and balances, the rule of law, and border communities. The court blocked all the wall projects currently slated for immediate construction. If the administration begins illegally diverting additional military funds, we'll be back in court to block that as well," CNN reported citing a statement from American Civil Liberties Union (ACLU) staff attorney Dror Ladin.
The decision comes more than three months after Trump declared a national emergency to divert billions of dollars from the Pentagon for the construction of his border wall.
The lawsuit was filed by the ACLU on behalf of plaintiffs the Sierra Club and Southern Border Communities Coalition.
The 56-page ruling blocked the administration from moving forward, with the specific projects intended for the Texas and Arizona regions, explaining that Trump could not disburse the funds without congressional approval.
"The position that when Congress declines the Executive's request to appropriate funds, the Executive nonetheless may simply find a way to spend those funds 'without Congress' does not square with fundamental separation of powers principles dating back to the earliest days of our Republic," Judge Haywood Gilliam of the Northern District of California wrote.
Friday's ruling does not prevent the Trump administration from using funds from other sources to build the projects - which would have added 57 miles of 18-foot-high fence to the wall.
However, construction on the projects could have begun as early as Saturday, the court said.
Some 20 states, environmental groups and civil liberties groups have filed suits against the administration to stay wall construction plans.
The federal government was shut down for 35 days, from Dec. 22 last year, during a standoff with Congress over border wall funding.
Erecting a wall at the U.S.-Mexico border was a Trump campaign promise.