LOS ANGELES (AP) — A federal judge on Friday permanently blocked the Trump administration from imposing conditions that police departments cooperate with immigration authorities to receive law enforcement grants.

The Department of Justice exceeded its authority and violated the constitution by requiring grant recipients to allow immigration authorities into jails and provide advance notice before releasing detainees suspected of being in the country illegally, Judge Manuel Real said.

ADVERTISEMENT

Real said he agreed with a related ruling from the 7th U.S. Circuit Court of Appeals in Chicago that said: “The attorney general in this case used the sword of federal funding to conscript state and local authorities to aid in federal civil immigration enforcement. But the power of the purse rests with Congress, which authorized the federal funds at issue and did not impose any immigration enforcement conditions on the receipt of such funds.”

As a sanctuary city, Los Angeles does not provide the cooperation required by the grants.

City Attorney Mike Feuer sought the permanent injunction in a lawsuit after LA didn’t receive Edward Byrne Memorial Justice Assistance Grants in 2017 for the first time in 20 years. The city had received more than $1 million each year from the grant that goes toward hiring, equipment, training and other needs.

“We’ve got to stand up for public safety in Los Angeles and against the Trump administration’s efforts to arrogate to itself authority it does not have,” Feuer said in a statement. “No matter who holds the presidency, the constitution is still the supreme law of land.”

A Justice Department spokeswoman didn’t immediately respond to an email seeking comment.

The ruling applies nationwide and includes another grant program aimed at fighting juvenile gang crime.

In a similar case, Real ruled in the city’s favor in April over a grant program for hiring police officers.

The grant rules were imposed by former Attorney General Jeff Sessions, who said cities endangered public safety if they didn’t help enforce immigration laws.

Los Angeles is one of many U.S. cities that have implemented sanctuary laws aimed at focusing law enforcement officers on local crime rather than detaining people suspected of being in the country illegally.

___

Associated Press writer Michael Balsamo in Washington contributed to this story.