A privately operated Mississippi prison that a federal judge once concluded was effectively run by gangs in collusion with corrupt prison guards, closed Thursday, its prisoners transferred to other state facilities, officials said.

Conditions at the prison, the Walnut Grove Correctional Facility, were deemed so substandard by Judge Carlton Reeves of Federal District Court, that he wrote in a 2012 settlement order that it “paints a picture of such horror as should be unrealized anywhere in the civilized world.”

The move to shutter Walnut Grove, in Leake County, comes one month after the Justice Department announced that it would phase out its use of private prisons to house federal inmates after concluding that such facilities are more dangerous and less effective than prisons run by the government.

But the Obama administration decision does not affect states, which have increasingly come to rely on private firms to manage prison populations, including Mississippi.