“We are not going to just send one or two officers in there,” Mr. Stirling said. “We’re going to gather a force that is safe for all our officers, and we’re going to go in and we’re going to take that dorm back with force. And if there’s any resistance, we’ll be able to put that resistance down immediately.”

When the trouble started, Mr. Stirling said later in a telephone interview, there were only two guards on duty in each of the three housing units, and they were armed only with pepper spray. Each housing unit holds about 250 inmates.

Assembling an armed SWAT team in a rural area on a Sunday night takes time, he said.

By the time the authorities had regained control, the disturbance at the prison was one of the worst of the last quarter-century. And it was an embarrassment for South Carolina, where officials have been trying to address prison problems with new sentencing policies to reduce the inmate population and higher pay for guards to reduce turnover.

Gov. Henry McMaster, a Republican, said on Monday that the riot was “unfortunate” but that flare-ups among criminals were inevitable.

“We know that prisons are places where people who have misbehaved on the outside go for rehabilitation, and also to take them from the general population,” he said. “It’s not a surprise when we have violent events take place inside prison.”