Judge blocks $1B in funding diverted under emergency order from being used to build border wall Trump has made building the wall his signature promise.

A California federal judge has blocked the Trump administration from using $1 billion diverted from military accounts, including pay and pension funds, to begin border wall construction.

The judge did not rule on the legality of the administration’s diversion of another $3.6 billion from military construction funds -- budgeted as part of a national emergency declaration -- since the administration has not yet identified a final plan to use those funds.

Construction on the wall was scheduled to begin as early as Saturday.

The ruling cited the Executive Branch's attempt to circumvent Congress as reason for blocking the funds.

Granting the Sierra Club and Southern Border Communities Coalition a preliminary injunction, U.S. District Judge Haywood S. Gilliam wrote, “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."

"The case is not about whether the challenged border barrier construction plan is wise or unwise," Gilliam wrote. It is about how the administration was planning to fund it, he explained.

The American Civil Liberties Union (ACLU), which filed the lawsuit on behalf of the Sierra Club and Southern Border Communities Coalition, celebrated the ruling. The group even sarcastically posted a video on Twitter of President Donald Trump repeatedly promising to build the wall.

"This is a win for our system of checks and balances, the rule of law, and border communities," the ACLU said in a statement. "The court blocked all wall projects currently slated for immediate construction."

"If the Trump administration begins illegally diverting additional funds, we'll be back in court," it added.

Gilliam, who was nominated by then-President Barack Obama in 2014, specifically cited frustration as not being enough to go against the "essential" function of "our constitutional system."

"Congress’s 'absolute' control over federal expenditures — even when that control may frustrate the desires of the Executive Branch regarding initiatives it views as important — is not a bug in our constitutional system. It is a feature of that system, and an essential one," Gilliam wrote.

Trump has made building the border wall the central tenant of both his campaign and now his presidency. He declared a national emergency on Feb. 15 as a means of securing funding for the wall after he could not get a bill passed in Congress to provide money for construction.

As recently as Monday at a campaign-style rally in Pennsylvania, Trump said the wall was "being built as we speak" and claimed "almost 500 miles" will be erected by the end of next year. However, that construction was based on winning the court battle and much of it would replace existing barriers, not build new wall.

ABC News' Amanda Maile contributed to this report.