(Bloomberg) -- The Trump administration got a rare win in the traditionally left-leaning U.S. appeals court in California, which said Friday that the Justice Department can take into account the cooperation of local police departments on immigration enforcement when awarding federal grants.

The City of Los Angeles had sued in 2017 to prevent Trump from using the grants to encourage local law enforcement to help with efforts to crack down on illegal immigration. The city won a lower court decision that has now been overturned. The Ninth Circuit Court of Appeals issued a split ruling, with two judges appointed by George W. Bush siding with the Justice Department while a Bill Clinton appointee dissented.

Los Angeles Wins Suit Against DOJ Over Immigration Policy (1)

According to the majority opinion, the Justice Department’s decision making encourages but does not coerce a local police department to cooperate on immigration enforcement. The department also didn’t act arbitrarily or capriciously when it decided to give extra points for grant applicants that adopted an illegal-immigration focus, according to the ruling.

The lawsuit has been one of many flash points between the Trump administration and so-called sanctuary cities, which argue that local police should stay out of immigration enforcement. Some big municipal departments say their involvement would discourage undocumented immigrants from cooperating with police and make it more difficult to fight crime.

To contact the reporter on this story: Edvard Pettersson in Los Angeles at epettersson@bloomberg.net

To contact the editors responsible for this story: David Glovin at dglovin@bloomberg.net, Steve Stroth

©2019 Bloomberg L.P.