Dylann Roof, the white man who claimed he wanted to start a race war when he killed nine black parishioners at Emanuel AME Church, was ambushed Thursday by a black inmate while preparing for a shower at the Charleston County jail.

He took a defensive stance but didn’t fight back as Dwayne Marion Stafford got in some blows, according to Sheriff Al Cannon. The attack was broken up within seconds, and 22-year-old Roof suffered minor injuries — some bruising his face and back.

Two detention officers were supposed to be with Roof during his shower around 7:45 a.m., but one had taken a break and the other was called to take toilet paper to a nearby cell, Cannon said.

Inmates in cells surrounding the open showers were supposed to be locked in, but Stafford, 25, of Goose Creek, somehow got out and charged down the stairs at Roof while he was unsupervised.

It was initially announced that Stafford would be charged with third-degree assault and battery, a misdemeanor, but Cannon said Roof and his attorney, Ashley Pennington, expressed no desire to pursue charges in the case. Pennington could not be reached for comment. Charges could still be brought in the case, but it would be difficult without a cooperating witness, Cannon said.

How Stafford got out of his cell remains a major part of the Sheriff’s Office investigation. He could have been let out, or there could have been an electronic malfunction with the cell locks. It was also unknown Thursday why one of the officers took a break during Roof’s shower time, which broke protocol, Cannon said.

“It seems to me, pretty obvious at this point, that at the very least, we have complacency,” he said. “We do things day in, day out, and they become routine, and as a result of that, it’s sometimes easy to become complacent. This certainly serves as a work wake-up call.”

The officers have been identified by authorities as Gerald Joye, hired in January, and Bobbie Johnson, hired in September 2012. They were still being interviewed Thursday and Cannon said a decision about whether they would return to their regularly scheduled shifts had not yet been made.

He added that no policies or procedures were changed in the aftermath of the attack because the ones already in place are adequate and should have been followed.

“It’s a matter of, again, making sure that folks stay at a heightened sense of awareness and that they do follow those policies and procedures,” he said.

Roof was evaluated by medical staff at the jail and then returned to protective custody, where he has remained since he was brought to the jail a day after the June 17, 2015, massacre at Emanuel.

Stafford was housed in the same unit as Roof, which was previously referred to as “segregation housing” by Assistant Sheriff Mitch Lucas. It’s the same unit that Michael Slager was housed in while he was at the jail.

The former North Charleston police officer shot Walter Scott to death after a struggle in April 2015. Slager was arrested on a state murder charge three days later, when a video of the killing surfaced publicly. He was indicted May 10 on federal charges of violating Scott’s rights while acting under the color of law, lying to investigators and using a firearm in a violent crime.

Stafford, now in disciplinary segregation, is being held on charges of strong-arm robbery, first-degree assault and battery and providing false information to a police officer.

Those cases are pending. He has frequented the jail for arrests on more than a dozen misdemeanor charges dating back to 2012, according to state records.

Even though he wasn’t charged, Stafford could still face internal disciplinary action as a result of the assault, according to Maj. Eric Watson.

Social media users were quick to praise his actions, with some asking whether a GoFundMe account has been created on his behalf. Others have hailed Stafford as a hero and called for him to receive a reduced sentence.

Roof is charged with nine counts of murder in state court. He also is charged with 33 counts, including hate crimes and religious rights violations, in federal court. He is awaiting trial and faces the death penalty in both cases.

Cannon said there was no specific motive in Stafford’s attack on Roof “beyond the obvious speculation that we would all have, given the nature of the situation.”

Andrew Knapp contributed to this report. Reach Melissa Boughton at 843-937-5594 or at Twitter.com/mboughtonPC.