California prisons will end a policy of imposing racially based lockdowns following a class-action lawsuit brought by inmates.

In the aftermath of riots, corrections officers in the state's prisons have, in the past, locked down all inmates from a particular racial group involved in a violent incident, and that went for individuals who may not have been involved in the incident. 

According to a settlement reached Wednesday, seen by the Associated Press, future lockdowns will no longer be based on race or ethnicity. Instead, all inmates in a section where there has been violence, and specific individuals or gangs that officers believe were involved, will be subject to restrictions.

The lawsuit was sparked by a 2008 complaint filed by an African-American inmate at California's High Desert State Prison, which alleged that he was repeatedly confined to his cell after incidents involving other prisoners of the same race, according to Reuters

A court ruling in July of this year granted class-action status to the suit, meaning that it covered all of the state's 125,000 prisoners.

Some prisons in California have utilized a system of color-coded signs that hang over prison cells: blue for black inmates; white for white; red, green or pink for Hispanic; and yellow for everyone else. According to a report from ProPublica, on any given day the sign system could mean that prisoners of a certain race have the opportunity to use the exercise yard, while others would remain confined to their cells.

Wednesday's settlement is the latest in a long line of legal maneuvers aimed at ending the practice, which has been ruled against multiple times in state and federal courts. In a 2005 Supreme Court ruling, Justice Sandra Day O’Connor wrote: “When government officials are permitted to use race as a proxy for gang membership and violence ... society as a whole suffers.”

California's prisons suffer from serious overcrowding. Despite a prison population that has declined in the new millennium, the state's 33 prison facilities are still operating at 150 percent capacity, according to a report from the Public Policy Institute of California. The same report notes that African-Americans are dramatically more likely to be incarcerated in the state's prisons, with a rate of 5,525 incarcerated per 100,000, compared to 1,146 for Latinos, 671 for non-Latino whites and 43 for Asians.