President Trump on Saturday ripped into what he described as an “activist Obama appointed judge” after a federal judge blocked the administration’s plan to reallocate money to building a wall on the southern border with Mexico.

“Another activist Obama appointed judge has just ruled against us on a section of the Southern Wall that is already under construction,” he said. “This is a ruling against Border Security and in favor of crime, drugs and human trafficking.”

JUDGE TEMPORARILY BLOCKS TRUMP'S BORDER WALL CONSTRUCTION PLANS

Trump went on to say that the administration is asking for “an expedited appeal.”

U.S District Court Judge Haywood Gilliam’s ruling late Friday temporarily prevents the administration from using reallocated funds for two wall-related projects in Arizona and Texas by diverting money that Congress has not approved.

Trump declared a national emergency in February and is using that declaration to redirect funding from the Pentagon, after Congress did not agree to the president’s demand for more than $5 billion in wall funding.

"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, an appointee of former President Barack Obama, wrote in his opinion.

“In short, 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,” he said.

Gilliam’s ruling does not stop the Trump administration from using other sources to fund the wall, and he rejected a request by California and 19 other states to prevent the diversion of $600 million in Treasury funds to the wall.

REPUBLICAN LAUNCHES FRESH PUSH TO DEFUND SANCTUARY CITIES AFTER COURTS BLOCK TRUMP

Trump’s declaration of a national emergency, coming after a 35-day government shutdown, was controversial on both sides of the aisle. A resolution disapproving of the declaration passed both chambers of Congress, but was vetoed at the president’s desk. House Speaker Nancy Pelosi, D-Calif., and Democratic Senate leader Chuck Schumer, D-N.Y., called it a “power grab by a disappointed president” in a statement.

Congress had OK’d $1.4 billion for border security, but it wasn’t close to the $5 billion Trump requested.

The White House eyed an additional $8 billion in existing funding that could be moved for the wall, $3.5 billion of which could be shifted over from the Defense Department’s military construction budget via the emergency declaration.

Trump predicted a difficult legal fight when he declared the national emergency, saying he believed it would end up in the Supreme Court.

CLICK HERE FOR THE FOX NEWS APP

"We will have a national emergency, and we will then be sued," Trump said, adding that the federal appeals courts could well rule against his administration. "Then we’ll end up in the Supreme Court, and hopefully we’ll get a fair shake, and we’ll win at the Supreme Court -- just like the [travel] ban.”

The case is one of a number of lawsuits the administration is facing over the declaration. On Thursday, a judge in Washington heard arguments on a lawsuit from the House of Representatives that claims it violates the Constitution.

The judge was considering whether the House can sue the president instead of resolving a dispute through the political process.

Fox News’ Louis Casiano, Brooke Singman and The Associated Press contributed to this report.