Rap mogul Jay-Z and hip-hop artist Yo Gotti wrote a letter to two top Mississippi officials protesting the conditions of Mississippi prisons and demanding change.

The letter contained a threat — Jay-Z and Yo Gotti are ready to sue the state if prison conditions aren't improved.

An outbreak of deadly gang violence that left five dead in Mississippi prisons has brought the system's long-running problems into sharp relief and under national scrutiny.

The letter, addressed to Mississippi Gov. Phil Bryant and Mississippi Department of Corrections Commissioner Pelicia Hall, mentions frequent prison lockdowns, violence, a staffing shortage and inmates who "are forced to live in squalor, with rats that crawl over them as they sleep on the floor, having been denied even a mattress for a cot."

In a statement, Yo Gotti called the conditions inside Mississippi prisons "absolutely inhumane and unconstitutional."

"To see this happen so close to my hometown of Memphis is truly devastating," the rapper's statement said. "That’s why we’re calling on Mississippi state leaders to take immediate action and rectify this issue. If they don’t right this wrong, we’re prepared to take legal action to provide relief for those that are incarcerated and their families.”

Alex Spiro, a New York lawyer representing Roc Nation, Yo Gotti and Jay-Z's company, signed the letter on behalf of Team Roc. He said he wrote the letter in collaboration with the celebrities.