Washington (CNN) A federal judge on Friday night blocked President Donald Trump from tapping into Defense Department funds to build parts of his US-Mexico border wall.

In a 56-page ruling , Judge Haywood Gilliam of the Northern District of California blocked the administration from moving forward with specific projects in New Mexico and Arizona, saying Trump couldn't disburse the funds without congressional approval. The lawsuit that prompted the ruling was filed by the American Civil Liberties Union on behalf of the plaintiffs, the Sierra Club and Southern Border Communities Coalition.

Although Friday's ruling does not prevent the Trump administration from using funds from other sources to build the projects, it's a setback for the President on a signature agenda item that has consistently been thwarted by Democrats in Congress. Construction on the projects affected by the ruling could have begun as early as Saturday, according to the ruling.

"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," writes Gilliam, a Barack Obama appointee.

He added, "because the Court has found that Plaintiffs are likely to show that Defendants' actions exceeded their statutory authority, and that irreparable harm will result from those actions, a preliminary injunction must issue pending a resolution of the merits of the case."

Read More