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 law Democratic Gov. Jerry Brown signed Friday will take effect Jan. 1, 2018.

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 for immigration violations. The new law will extend the protection to victims and witnesses of all crimes.