A Mississippi prison with "gangs run amok" will not be released from its obligation to oversee and protect its inmates, U.S. District Judge Carlton Reeves ruled on Thursday, according to media reports. The ruling indicates that prisoners at the Walnut Grove Correctional Facility had their Eighth Amendment rights -- protecting them from cruel and unusual punishment -- violated because of gang violence and unsafe conditions.

The prison -- which is run by Utah's privately owned Management and Training Corporation -- has experienced two riots in the past year, and guards often colluded with gangs, according to a press release from the American Civil Liberties Union and the Southern Poverty Law Center, which are plaintiffs in the case. Reeves commented that the prison left the inmates in serious danger.

"The evidence before the court paints a picture of a facility struggling with disorder, periodic mayhem, and staff ineptitude which leads to perpetual danger to the inmates and staff," Reeves wrote in his order according to The Clarion-Ledger. "The dangers that inmates face are not simply limited to assaults by other inmates but also from the guards."

The Walnut Grove Correctional Facility was put under a consent decree in 2012 that allowed oversight of the prison and routine visits from court-appointed monitors. The Mississippi Department of Corrections (MDOC) asked for that decree -- scheduled to run until 2017 -- to end two years early because it had already made improvements. After the second riot in less than a year, the plaintiffs asked for the decree to be modified, which then led the MDOC to file its motion to have the oversight dropped altogether. Reeves ruled that the prison remained unsafe and that the inmates' constitutional rights had been violated.

“With this federal court ruling, the Mississippi Department of Corrections must step up to its responsibility under the Constitution and protect the prisoners of Walnut Grove from violence,” said Margaret Winter, associate director of the ACLU’s National Prison Project, in a statement. “The department can no longer sit back and let a for-profit prison company neglect the prisoners’ safety on the state’s dime. We will make sure that this historic judgment is enforced, and we hope its impact will be felt not only at Walnut Grove but at prisons throughout the state.”