California Gov. Jerry Brown has signed "sanctuary state" legislation that extends protections statewide for immigrants living in the United States illegally.
The action Thursday gives the nation's most populous state another tool in its arsenal of legal weapons to fight President Donald Trump.
The bill bars police from asking people about their immigration status or participating in federal immigration enforcement activities in most cases starting Jan. 1.
California is home to an estimated 2.3 million immigrations without legal authorization.
California's Democratic Senate leader Kevin de Leon introduced the bill in response to widespread fear in immigrant communities following the election of Trump, who railed against immigrants in his campaign and promised to sharply ramp up deportation.
California's influential sheriff's association opposed the measure, warning it would make it harder for them to protect the public.