A federal court has ordered the city of Los Angeles to stop enforcing most of its remaining gang injunctions, marking the end of the controversial practice that critics long called unconstitutional.

The preliminary injunction will end restrictive sanctions for roughly 1,500 people put under gang injunctions without due process by the Los Angeles Police Department and the Los Angeles City Attorney’s office, according to the ACLU of Southern California. Because the city did not allow accused individuals the opportunity to defend themselves, the court issued a preliminary holding that the city likely violated the Constitution, the statement said.

RELATED: Alleged L.A. Gang Member, You Are Now Free to Wear that Dodgers Jersey

The ACLU Foundation of Southern California, the Urban Peace Institute, and the law firm of Munger, Tolles & Olson LLP filed a class action suit on be half of people unconstitutionally subjected to gang injunctions, along with the Youth Justice Coalition, an organization fighting against unjust accusations of gang affiliation.

According to the LAPD’s online site a gang injunction is a restraining order that seeks a court order declaring the gang’s public behavior a nuisance and asking for special rules directed toward its activity. They argue that injunctions can address the neighborhood’s gang problem before it reaches the level of felony crime activity.

The ACLU says that the city has put a number of Angelenos, mostly men of color, under probation-like conditions for years, solely based on arbitrary claims of gang membership. Some of the effects of the injunctions included people being unable to ride in vehicles together to schools or churches, and in some alleged gang territories, being unable to wear blue Dodgers gear.

This decision is historic in confirming what communities of color have said for decades, Youth Justice Coalition’s Kim McGill said in the 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.

See a map of city wide gang injunctions here.

RELATED: LAPD Launches Crime Maps