(Reuters) - U.S. Attorney General Jeff Sessions stepped up the Trump administration’s critique of so-called sanctuary cities on Tuesday, saying local and state policies to limit cooperation with immigration enforcement are a criminal’s “best friend.”

Sessions’ remarks, at a gathering of law enforcement authorities in Portland, Oregon, came days after repudiation of his stance against the sanctuary movement in separate actions by a federal judge in Chicago and the California legislature.

The judge in Chicago on Friday barred the Justice Department from withholding public safety grants to cities unless they allowed U.S. immigration authorities unlimited access to local jails and provided 48 hours’ notice before releasing individuals sought for deportation.

On Saturday, California lawmakers voted to make California a sanctuary state, approving a bill barring local governments from forcing undocumented immigrants to spend extra time in jail just to allow immigration agents to take them into their custody.

But under a compromise negotiated with Governor Jerry Brown, the bill allows local police to notify the federal government if they have arrested an undocumented immigrant with a felony record. It also allows immigration agents access to local jails.

Sessions called on local jurisdictions that have sought to shield illegal immigrants from deportation efforts to reconsider, and he urged Brown not to sign the California bill into law.

President Donald Trump and his administration have insisted that the deportation crackdown is aimed at illegal immigrants convicted of serious crimes, and that sanctuary measures contribute to rising crime.

“Such policies undermine the moral authority of law and undermine the safety of the jurisdictions that adopt them,” Sessions said. “That makes a sanctuary city a trafficker, smuggler or gang member’s best friend.”

He cited cases in Oregon and California in which illegal immigrants were charged with committing violent crimes after being arrested for relatively minor offenses by local police and then released, despite federal requests to keep them in custody.

Sanctuary supporters counter that enlisting police cooperation in deportation actions undermines community trust in local law enforcement, particularly among Latinos, and they question whether Trump is really targeting dangerous criminals.

“We’re not soldiers of Donald Trump or the federal immigration service,” Brown said in a CNN interview on Tuesday. He called the measure passed by California’s legislature “a well-balanced bill.”

Portland Mayor Ted Wheeler said in a letter to Sessions that Oregon state law dating back to 1987 prohibits state and local police from enforcing federal immigration law.