SACRAMENTO, Calif. (AP)  California police will soon be barred from arresting crime victims or witnesses just because of actual or suspected immigration violations under a new law the governor signed Friday.

The measure is one of several authored by state lawmakers to ensure people living in the country illegally who otherwise follow the law are not deterred from reporting crimes or serving as witnesses.

Police are already prohibited from detaining people who report or are assisting with investigations of hate crimes.

The new law, which takes effect Jan. 1, will extend the protection to victims and witnesses of all crimes unless police are executing a warrant.

It will also prohibit police from turning a crime victim or witness over to federal immigration authorities without a warrant.

Assemblyman Reggie Jones-Sawyer, who authored the measure, says it will help immigrants cooperate with law enforcement.

The Los Angeles Democrat has argued the measure is particularly important in light of Republican President Donald Trump’s promises to crack down on illegal immigration and ramp up deportations.

California is home to a significant portion of the country’s undocumented population. Democrats who control the state Legislature have vowed to push back against Trump’s immigration policies.

Also on Friday, another high-profile immigration bill, SB54, passed out of a key committee. That bill, known as the “sanctuary state” bill, would prohibit law enforcement from cooperating with federal immigration authorities. It now heads to the floor of the Assembly for a vote.