President Trump vowed Saturday to “immediately” appeal a judge’s ruling blocking funding for his border wall, while reviving threats to proceed with stalled deportation raids as soon as a week from now.

The president discussed his immigration plans as part of a wide-ranging press conference following the G-20 summit in Osaka, Japan.

HOUSE OKS BORDER BILL AFTER PELOSI REVERSES COURSE

His administration, just after notching a win with the passage of a $4.6 billion bill to address the humanitarian crisis along the U.S.-Mexico border, was dealt a blow Friday when a California judge barred Trump from tapping $2.5 billion in military funding to build high-priority segments of the border wall in California, Arizona and New Mexico. Judge Haywood S. Gilliam, Jr. in Oakland acted in two lawsuits filed by California and by activists who contended the money transfer was unlawful and construction would pose environmental threats.

"We're immediately appealing it and we think we'll win the appeal," Trump said at his press conference, calling the decision a disgrace. "There was no reason that that should have happened.”

Meanwhile, the president made clear that despite the passage of the aid package in Congress, he plans to move forward with controversial Immigration and Customs Enforcement raids absent a deal on reforming the asylum process, which he described as unlikely.

“We will be removing large numbers of people … starting in a week after, you know, sometime after July 4th,” Trump said.

Those planned raids have been the subject of intense debate and a source of immense turmoil inside the Department of Homeland Security. Before last weekend, The Washington Post reported on the closely held plan to target families in up to 10 cities across the U.S. for deportation raids. The plans prompted outrage from Democrats and, last Saturday, Trump said he would agree to their requests to delay the operation “for two weeks” to see if they can strike a deal on “Asylum and Loophole problems at the Southern Border.”

But the past week was consumed by negotiations over the humanitarian aid bill, which Congress passed right before the start of the holiday break.

While Trump expressed gratitude to House Speaker Nancy Pelosi for helping pass that package – she steamrolled the liberal wing of her party in order to move a bipartisan package that did not include restrictions on enforcement sought by that wing – the president suggested that bill does not make ICE raids less likely.

The raid plan, as well as national controversy over poor conditions at certain migrant detention centers, has been the backdrop to a major reshuffling at the top levels of the Department of Homeland Security. New leaders have been installed this past week at ICE and Customs and Border Protection -- as the DHS secretary himself faces questions about his future.

Acting Secretary Kevin McAleenan has been accused of leaking those planned raids. But during an appearance on Fox News’ “The Ingraham Angle,” he again denied it.

"I would not, have not, ever leaked details of a sensitive law enforcement operation," he said.

One senior administration official told Fox News on Thursday that after the alleged leak, "He’s lost the confidence and trust of both the workforce and his superiors, with no viable path to proceed with any confidence and credibility."

The official lamented the state of morale at the department, saying: “DHS has devolved into chaos and employee morale is abysmal.”

NEW LEADERS INSTALLED AT DHS AMID QUESTIONS OVER SECRETARY'S FUTURE

McAleenan, though, touted at a press conference on Friday that the flow at the border is reducing, saying he expects as much as a 25 percent reduction in border apprehensions in June – from soaring levels so far this year.

The California judge’s wall ruling on Friday created yet another front in the ever-expanding legal, political and physical battle over immigration.

"All President Trump has succeeded in building is a constitutional crisis, threatening immediate harm to our state," said California Attorney General Xavier Becerra, who led a 20-state coalition of attorneys general in one lawsuit.

The U.S. 9th Circuit Court of Appeals is expected to take up the same issue of using military money next week.

At issue is Trump's February declaration of a national emergency so that he could divert $6.7 billion from military and other sources to begin construction of the wall, which could have begun as early as Monday.

Trump declared the emergency after losing a fight with the Democratic-led House that led to a 35-day government shutdown. The president identified $3.6 billion from military construction funds, $2.5 billion from Defense Department counterdrug activities and $600 million from the Treasury Department's asset forfeiture fund.

The judge Friday didn't rule on funding from the military construction and Treasury budgets.

In the second suit, brought by the American Civil Liberties Union on behalf of Sierra Club and the Southern Border Communities Coalition, the judge determined that the use of the $2.5 billion for two sectors of the wall was unlawful, although he rejected environmental arguments that wall construction would threaten species such as bighorn sheep.

Fox News’ Brooke Singman and Jake Gibson and The Associated Press contributed to this report.