A judge on Thursday ruled California’s sanctuary law tramples on the state’s charter cities, dealing a major blow to the state Democratic establishment’s anti-Trump policy.

California Judge James Crandall ruled in favor of Huntington Beach, which had argued it should be exempt from the law, which prohibits locales from cooperating with federal immigration authorities.

Judge Crandall issued his ruling after a hearing Thursday, The Los Angeles Times reported.

Huntington Beach was one of a number of California jurisdictions that moved to try to thwart the state’s law, SB 54, which took effect at the beginning of this year.

California’s Democrat-led government had adopted the law as a political jab at the Trump administration, which has tried to increase deportations of illegal immigrants.

State officials say that having police cooperate in deportations scares immigrants, both legal and illegal, who then refuse to cooperate with authorities on other matters.

Judge Crandall didn’t buy that, instead siding with local officials who said they valued cooperation with federal immigration authorities, The L.A. Times reported.

The ruling applies to more than 100 charter cities in California.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.