NORTH CHARLESTON, S.C. (Reuters) - The white gunman accused of killing nine black parishioners at a Charleston, South Carolina, church last year was slightly injured in jail by another inmate early Thursday, Charleston County Sheriff Al Cannon said on Thursday.

Dylann Roof, 22, was outside his cell and getting ready to shower at the North Charleston jail where he is detained when the assault occurred, the sheriff said.

Cannon said he did not know what motivated the 25-year-old inmate, Dwayne Stafford, who is black, to punch Roof a number of times in the face and back. Officials were unaware of any verbal exchanges between the two inmates in the past, he said.

Dwayne Marion Stafford is the inmate accused of attacking Dylann Roof in the shower today #chsnewspic.twitter.com/DOCvC2wRAO — Angie Jackson (@AngieJackson23) August 4, 2016

Prosecutors have said Roof's attack on the historic Emanuel African Methodist Episcopal Church in June 2015 was racially motivated.

On Thursday, two detention officers quickly responded and separated the inmates, Cannon said.

The church shooting suspect is being held in a protective custody unit at the Sheriff Al Cannon Detention Center and is not supposed to have any interaction with other inmates.

Cannon said his office will investigate how Stafford was able to exit his cell, which should have been locked while Roof was showering.

The sheriff said he also wanted to know why one detention officer was taking a break while another responded to an inmate who needed toilet paper, leaving Roof unguarded.

"At the very least, we have complacency, which for police officers and detention officers is one of the biggest challenges we face," the sheriff said. "This certainly serves as a wakeup call."

Look back at the deadly shooting in Charleston:



15 PHOTOS Charleston SC shooting suspect. Dylann Roof See Gallery Charleston SC shooting suspect. Dylann Roof Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. Photos found on a website that allegedly belongs to church shooting suspect Dylann Roof. This image has been provided by the Charleston Police Department, Thursday, June 18, 2015. A man opened fire during a prayer meeting inside a historic black church in downtown Charleston, S.C., Wednesday night, June 17, 2015, killing nine people, including the pastor in an assault that authorities are calling a hate crime. The shooter remained at large Thursday. (Photo via Charleston Police Department) The Emanuel AME Church is viewed behind a police vehicle on June 18, 2015 in Charleston, South Carolina, after a mass shooting at the Church on the evening of June 17, 2015. US police on Thursday arrested a 21-year-old white gunman suspected of killing nine people at a prayer meeting in one of the nation's oldest black churches in Charleston, an attack being probed as a hate crime. The shooting at the Emanuel African Methodist Episcopal Church in the southeastern US city was one of the worst attacks on a place of worship in the country in recent years, and comes at a time of lingering racial tensions. AFP PHOTO/BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images) A police officer holds up a tape in front of the Emanuel AME Church June 18, 2015 in Charleston, South Carolina, after a mass shooting at the church on the evening of June 17, 2015. US police on Thursday arrested a 21-year-old white gunman suspected of killing nine people at a prayer meeting in one of the nation's oldest black churches in Charleston, an attack being probed as a hate crime. The shooting at the Emanuel African Methodist Episcopal Church in the southeastern US city was one of the worst attacks on a place of worship in the country in recent years, and comes at a time of lingering racial tensions. AFP PHOTO/BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images) A view ofthe Emanuel AME Church is seen June 18, 2015 in Charleston, South Carolina, after a mass shooting at the church on the evening of June 17, 2015. US police on Thursday arrested a 21-year-old white gunman suspected of killing nine people at a prayer meeting in one of the nation's oldest black churches in Charleston, an attack being probed as a hate crime. The shooting at the Emanuel African Methodist Episcopal Church in the southeastern US city was one of the worst attacks on a place of worship in the country in recent years, and comes at a time of lingering racial tensions. AFP PHOTO/BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images) Up Next See Gallery Discover More Like This HIDE CAPTION SHOW CAPTION of SEE ALL BACK TO SLIDE

The sheriff's office issued an incident report that said an arrest warrant would be sought to charge Stafford with assault and battery, but Cannon later said Roof and his lawyer had indicated they would not pursue charges.

Prosecutors have charged Roof with dozens of offenses in both state and federal courts, including murder and hate crimes, and could face the death penalty. The federal trial is set to begin Nov. 7.

Court records filed by prosecutors in federal court in July said Roof used eight Glock handgun magazines and fired about 80 rounds during the massacre which he had plotted for months.

Roof's attorneys argued in U.S. court papers filed this week that he should not face the federal death penalty, which they deemed "cruel and unusual punishment" and, as a result, unconstitutional.

(Reporting by Harriet McLeod; Writing by Colleen Jenkins; Editing by David Gregorio; Additional reporting by AOL.com)

More from :

Lawyers of U.S. church shooter argue federal death penalty unconstitutional

Man shocked by thousands in fees added to his pre-paid burial plan

Prosecutors drop murder charge against man accused of killing Chandra Levy