Bishopville - A gang-related dispute sparked an overnight riot in a South Carolina prison that killed seven inmates, the deadliest U.S. prison riot since 1993, state officials and prison safety experts said on Monday.

Another 17 people were wounded in an eight-hour long series of fights at the Lee Correctional Institution in Bishopville, South Carolina, said Bryan Stirling, director of the state Department of Corrections.

"This was all about territory. This was about contraband, this was about cellphones," Stirling told a news conference. 

"These folks are fighting over real money and real territory while they are incarcerated."

The violence was quelled at 2:55 a.m. EDT (0655 GMT), the state Corrections Department said on Twitter.

It was the deadliest U.S. prison riot since 1993, when nine inmates and one corrections officer died at the Southern Ohio Correctional Facility in Lucasville, said Steve Martin, a prisons expert and now the federal monitor for the consent decree involving New York City's Rikers Island jail complex.

All seven deaths were the result of stabbing injuries, said Lee County Coroner Larry Logan.

The prison has 1,583 inmates. Forty-four guards were on duty at the time the violence broke out, Stirling said. They gathered reinforcements before moving in to quell the riot and encountered no resistance when they moved in, Stirling said.

The prison population in South Carolina fell about 15% from 2010 to mid-2017, to 20,105, with beds being underutilized across the state, the department's fiscal 2017 Accountability Report said.

The state has about 5 000 prison employees in 22 institutions, but "security staff numbers continue to lag behind the authorized strength," it said, without giving numbers.

Martin said staff shortages could have been a contributing factor in the riot.

"When high-security inmates start engaging each other and there aren't enough staff, it's hard to stop it," Martin said in a phone interview.

State data show there were 37 serious inmate assaults on prison employees last year, up from 21 in 2015.

State officials identified the slain inmates as Raymond Scott, 28, who was serving a 20-year sentence for crimes including assault and battery; Michael Milledge, 44, serving 25 years for drug trafficking; Damonte Rivera, 24, serving life for murder; Eddie Gaskins, 32, serving 10 years for domestic violence; Joshua Jenkins, 33, serving 15 years for manslaughter; Corey Scott, 38, serving 22 years for kidnapping; and Cornelius McClary, 33, serving 25 years for burglary.