In the latest separation-of-powers blow to President Donald Trump, a federal judge in San Francisco has put the kibosh on part of the executive order that threatens the loss of federal funds if so-called “sanctuary cities” don’t comply with U.S. immigration laws.

District Court Judge William Orrick issued the preliminary injunction today in a lawsuit that challenges the order Trump signed in January. The injunction was sought by San Francisco and Santa Clara County, the latter of which filed the lawsuit February 3. The ruling remains valid while the case wends through the legal system.

“As California continues to abide by the Constitution, yet another court has ruled against the Trump administration’s executive overreach,” California Attorney General Xavier Becerra said in a statement. “My office has been clear: We will not compromise our values to accommodate the new administration, which seeks to hijack crucial resources, sow fear among California families and make our communities less safe. This injunction is consistent with the rule of law. In California, we will always fight to protect our people.”

The news comes four days after the Justice Department put eight sanctuary cities — localities where law enforcement offers limited cooperation with federal immigration officials seeking to deport illegal immigrants — “on notice” that they must comply with federal laws by June 30 or risk losing federal funding.

“We’re fighting for the United States Constitution, and we succeeded after the Trump administration tried to do an end run around it,” Santa Clara County Supervisor Cindy Chavez said in the statement. “The court’s decision is a win for the neediest people in our nation: seniors in need of food, foster youth in need of shelter and children who need medical care. We’ll continue being a welcoming, safe and diverse community.”

Hundreds of U.S. jurisdictions have declared themselves sanctuaries for undocumented immigrants, saying they will not turn those people over to federal agents. The list of sanctuary cities ranges from Los Angeles and San Francisco — and much of California — to Chicago and Detroit to Baltimore and New York City and elsewhere.