For weeks, Mississippi’s prisons have been gripped by crisis. At least a dozen inmates have been slain or killed themselves, and feuding gangs have forced lockdowns. Images and videos taken on smuggled cellphones have highlighted deteriorating conditions, and legislators and activists have asked for federal intervention.

The Justice Department responded to the turmoil on Wednesday by announcing a civil rights investigation to explore whether prison officials have done enough to protect inmates from one another and the quality of mental health care and suicide prevention efforts.

In a statement, officials said the inquiry would focus on four prisons, including its facility in Parchman, a Mississippi Delta prison notorious for its history of harsh conditions.

The federal investigation follows a burst of violence that began in late December and prompted the lockdown of prisons across the state. Officials attributed the disorder to warring gangs, but the turmoil has underscored the broader troubles plaguing an understaffed prison system as it has descended into chaos.