California lawmakers have approved a bill to make the most populous U.S. state a sanctuary state for immigrants who do not have legal residency.
The measure would ban police from asking for the immigration status of people who have been arrested. It also would limit police cooperation with immigration officers.
Governor Jerry Brown says he supports the move that will boost immigrant protections in the state.
Donald Trump promised during his presidential campaign to crack down on undocumented immigrants and to launch an extensive deportation program.
California Senate leader Kevin de Leon said the bill will prevent local police from becoming "cogs in the Trump deportation machine."
Provisions in the bill, however, will allow local and state enforcement officials to share information with federal immigration authorities if a person has been convicted of one or more of 800 crimes.
The governor of Illinois signed a bill last month protecting people from being detained simply because of their immigration status or because they are the subject of an immigration-related warrant.