By Joel Rubin and Dakota Smith

The U.S. Department of Justice cannot favor police departments that are willing to cooperate with immigration agents when it doles out tens of millions of dollars in funding each year, a federal judge in Los Angeles ruled this week.

U.S. District Judge Manuel Real issued a permanent, nationwide ban against a Justice Department policy that gave an edge to obliging police departments applying for a community policing grant program. In doing so, Real dealt a legal setback to the Trump administration in its aggressive campaign to crack down on illegal immigration and to force compliance from law enforcement officials.

"This is a complete victory," said Los Angeles City Atty. Mike Feuer, who challenged the new rules in federal court last year. "This is yet another dagger in the heart of the administration's efforts to use federal funds as a weapon to make local jurisdictions complicit in its civil immigration enforcement policies."

Calling the ruling "overbroad and inconsistent with the rule of law," a Justice Department spokesman said the government was within its rights to give preference to departments that assisted in immigration enforcement.

"The Department has the lawful discretion to give additional consideration for jurisdictions that prioritize the safety of their communities and their law enforcement officers when they promise to cooperate with federal immigration authorities seeking information about illegal aliens who have committed crimes," Devin M. O'Malley said in a statement.

Feuer, who was flanked Thursday by Mayor Eric Garcetti and Los Angeles Police Chief Charlie Beck, filed a lawsuit in September, claiming that U.S. Atty. Gen. Jeff Sessions had overreached his authority and crossed constitutional lines when the Justice Department changed how it judged applications from local police agencies for the Community Oriented Policing Services program. The LAPD applied for funding and was rejected.

For years, police departments around the country have sought a share of the program's funds to bolster their community policing programs, which are focused on building stronger ties and trust with neighborhoods instead of traditional law-and-order enforcement.

Los Angeles applied regularly to the program and often received funds. In 2016, the LAPD was awarded $3.125 million and has received as much as $16.8 million in previous years. The department typically uses the money to add officers to its Community Safety Partnership program. Instead of focusing on arrests, officers in the program take on assignments coaching sports teams and leading mentoring programs.

The strategy, police say, has paid off. Violent crime dropped by more than 50% and arrests were cut in half during the program's first three years in three Watts housing developments, officials have said. Police also credit the program for a three-year stretch without a homicide in Jordan Downs, one of the developments.

Last year, however, Sessions implemented a change in how applications for the grant would be scored: Additional points would be awarded to police departments that helped Immigration and Customs Enforcement agents identify and apprehend jail inmates believed to be in the country illegally.

To get the point boost, police departments had to be willing to alert ICE 48 hours before releasing inmates who agents had targeted for deportation and were required to give ICE agents access to jail facilities so they could interview inmates and review records. Los Angeles, which refused to abide by the new rules, was not awarded any funds, while 80% of the departments that did receive money cooperated with ICE, court records show.

The move by Sessions fit into a larger campaign to clear the way for immigration agents to dramatically ramp up the number of people they arrest and deport. President Trump and Sessions have been infuriated by so-called sanctuary municipalities such as Los Angeles that, to varying degrees, refuse to help federal authorities enforce immigration laws because of legal and moral concerns over cooperating.

Sessions has tried to punish objectors through public shaming and threats of withholding funds.

An executive order by Trump that sought to deny a broad array of federal funding to sanctuary cities was knocked down in federal court last year. Since then, Sessions has made more targeted threats to withhold just law enforcement related-funds. Those threats too have been met with legal challenges by Feuer and others.

Jean Reisz, a professor at the USC Gould School of Law who specializes in immigration issues, said that she's not surprised by Thursday's announcement or the other, similar ones.

"The courts have held that the government can't coerce a local jurisdiction to enact a federal law," she said. "The federal government can't force local jurisdictions to enforce immigration laws. That's something the federal government has to do."

The legal sparring ratcheted up last month, when the Justice Department sued California over laws that, among other things, make it a crime for business owners to voluntarily help federal agents find and detain workers in the country illegally and prohibit local law enforcement from alerting immigration agents when detainees are released from custody.

For decades, the LAPD has abided by rules that sharply restrict an officer's ability to inquire about a person's immigration status. In a city with a large population of immigrants living in the country illegally, the rules are meant to assure immigrants that they can report crimes without fear of being questioned about their status in the country.

During his tenure, Beck has been particularly assertive on the need for the department to build trust with the city's immigrant communities.

The court ruling, Beck said, showed that "we won't be bullied and we can't be bought. You cannot force us to go against our philosophies, to go against our principles by withholding money."

Losing out on funding last year upended the LAPD's plans to hire 25 officers for the community policing program in Harvard Park, one of the city's deadliest neighborhoods. Instead, Beck said, the city cobbled together money from private donors and local public funds to carry out the Harvard Park plans. The ruling this week does not allow city to retroactively seek money.

In issuing his ruling, Judge Real sided with Feuer, saying the new funding rules violated the separation of powers laid out in the nation's Constitution.

Real found that tying funds to cooperation with ICE was an improper attempt to force local police to participate in immigration enforcement, which is the job of the federal government. The move, he wrote, "upset the constitutional balance between state and federal power by requiring state and local law enforcement to partner with federal authorities."

The judge said the rules also violated the authority given to Congress to control government spending.

As a result, Los Angeles and other cities that refused to adhere to the funding requirements were put at a disadvantage and would be handicapped again in future years, Real concluded. The remedy, he said, was to issue a permanent injunction against the Justice Department that prohibits it from giving an advantage to departments that play along with ICE.

Saying the Trump administration "has been hostile to the law, to our constitution, to immigrants and most importantly, to public safety," Garcetti praised the ruling.

"Today, the court said loud and clear what we have said loud and clear: Quit politicizing public safety," he said.

(c)2018 the Los Angeles Times