In his ruling, Judge William H. Orrick sided with Santa Clara County, the city of San Francisco and other jurisdictions, who argued that a threat to take away federal funds from cities that do not cooperate with some federal immigration enforcement could be unconstitutional.