SANTA CLARA, Calif. (KGO) -- On Monday, a district judge sided with Santa Clara County and San Francisco and issued a permanent injunction of President Trump's Executive Order on sanctuary jurisdictions.
RELATED: Santa Clara County Supervisors unanimously vote to file lawsuit against Trump
It means the administration can not withhold federal funding from sanctuary cities and counties.
"Every step of the way the County of Santa Clara has won on this case and this is really an almost fatal blow to the administration on the issue of detention of immigrants without due process," said Dave Cortese, President of the Santa Clara County Board of Supervisors.
The term "sanctuary city" has come to describe a jurisdiction that won't allow local law enforcement to hold someone in custody on behalf of Immigration and Customs Enforcement.
Santa Clara County could have lost $1.7 billion in federal funding, while San Francisco had $2 billion at stake.
San Francisco also sued.
RELATED: Attorney General Jeff Sessions threatens funding for sanctuary cities
City Attorney, Dennis Herrera, released a statement on the judge's ruling that reads in part: "President Trump might be able to tweet whatever comes to mind, but he can't grant himself new authority because he feels like it."
A San Jose immigration attorney is applauding the judge's decision.
"I'm thrilled. The courts are doing what they need to do to protect us from governmental overreach. The system's working," said Merle Kahn.
The Department of Justice said the district court exceeded its authority and it's preparing to fight "the setback."
Click here for more stories, photos, and video on sanctuary cities.
Judge sides with Santa Clara, SF by blocking Trump's order to cut funding from sanctuary cities