The U.S. Department of Justice says California is violating the federal Constitution when it punishes prison inmates after riots based on their race.

Gangs in California prisons typically are based on the race of the inmates, and riots often pit members of one race against one another or involve inmates of only one race.

After the riots, officers often lock inmates in their cells based on which races were involved to prevent further violence, whether or not those inmates were involved.

In a court filing, the Justice Department says the practice violates the 14th Amendment, which requires equal protection under the law. The filing is not binding, but is part of an ongoing class-action lawsuit in federal court in Sacramento.