For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

A federal court ruled on Thursday that Los Angeles County must stop its enforcement of gang injunctions, handing a major victory to criminal justice advocates who have long fought against the tactic that they say guts communities of color. The county argued that that doing away with gang injunctions would pose a threat to public safety, but the 22-page ruling, issued by US District Court Judge Virginia A. Phillips, called that line of thinking “unpersuasive.”

For nearly two decades, certain prosecutor’s offices, particularly in California, have used civil injunctions to try to prevent gang violence. The way they work is fairly simple: If a prosecutor’s office can prove that an individual—often a young person—has gang ties and poses a threat to the community, it can file what is effectively a restraining order that prevents that individual from living or congregating in that community, wearing specific clothing, or associating with other people listed on the injunction.

But criminal justice and civil liberties advocates, as well as many people who have found themselves on gang injunction lists, have argued that the evidence used to put individuals on the list is often questionable, at best, and that many people are unlawfully criminalized for their associations with family and neighbors. In practice, they argue, the injunctions discriminate against black and Latino youth and they do little to substantively improve public safety at a rate that justifies their expansive use. (That said, research on the longterm effects of gang injunctions is limited.)

Critics also argue that the injunctions don’t make a lot of practical sense, since they bar at-risk young people from living and congregating in their communities, which are often critical sources of familial, financial, and emotional support.

But even beyond all that, the heart of the legal argument against gang injunctions is that they restrict people’s movements, clothing, and personal relationships without acknowledging an individual’s constitutional right to due process.

Thursday’s ruling stems from a class-action lawsuit filed by a cluster of civil rights groups, including the ACLU of Southern California, which is working on behalf of Youth Justice Coalition, a Los Angeles-based community organization. At the time the suit was filed in 2016, Los Angeles County was enforcing 46 separate injunctions against approximately 10,000 people. All these people were in areas that, combined, make up 75 square miles—a total 15 percent of the city, according to the Los Angeles Times.

“They’re basically subject to parole-like restrictions without any hearing on whether or not they are actually a gang member,” Peter Bibring, director of police practices for the ACLU of Southern California, told the LA Times in 2016. “That violates any notion of due process.”

Gang injunctions were first used as a law enforcement tactic back in 1987, under then-Los Angeles City Attorney James Hahn. It was almost immediately controversial. One of the more comprehensive reports on gang injunctions published by criminal justice advocates argues that the very first injunction, issued primarily against the Playboy Gangster Crips in ’87, didn’t aim to curb violence in black communities in the gang’s territory on the city’s west side so much as it sought to prevent that violence from spreading to wealthier and whiter enclaves in Culver City and Beverly Hills. It’s a critique that has proliferated as gang injunctions spread up and down the state from San Diego to San Francisco, and to other cities like Memphis and Houston.

Widespread criticism has alleged that the injunctions are just one gear in the machine of gentrification that pushed black and Latino families farther out of city centers. Just this year, longtime San Francisco public defender Jeff Adachi wrote a letter to City Attorney Dennis Herrera, urging him to finally do away with the injunctions.

“People named in the injunctions, and their families and acquaintances, eventually are inclined to leave The City to escape this curtailment of their civil liberties,” Adachi wrote, according to the San Francisco Examiner. “This has directly contributed to the gentrification of these predominantly African-American and Latino communities over the past decade.”

Many, including the plaintiffs, are optimistic that Thursday’s ruling could have a ripple effect across the state, and the country.

“This decision is historic in confirming what communities of color have said for decades,” Kim McGill of Youth Justice Coalition, the group on behalf of whom the suit was filed, said in an ACLU press release. “Gang injunctions are prisons without walls. They are overly harsh, serve to cut people off from the opportunities and supports they need to succeed, serve as tools of gentrification and displacement, and criminalize thousands of people for non-criminal acts further enforcing racial and economic discrimination in the implementation of public safety.”