Yet despite the addition of formal protocols and protective clothing, the process remains dangerous.

“It’s always violent, and it’s always unsafe for staff. It’s unsafe for inmates,” said Brad Hansen, emergency management supervisor for the Department of Correctional Services in Nebraska.

Officers have been stabbed with homemade knives. They have slipped on cell floors slick with water or shampoo. They have been spit on or bitten by prisoners with H.I.V. or hepatitis C and sustained cuts and bruises from wrestling prisoners to the floor. Dr. Schwartz, the corrections consultant, recalled an officer whose leg was badly cut during the making of a training film on cell extractions.

The highest risk, however, is for prisoners, who wear no body armor and are greatly outnumbered.

Mr. Toll, who had been forcibly removed from a cell once before, described to his mother feeling “like a rag doll.” Todd White, the inmate at Riverbend whose head was slammed into a wall by guards after he was in restraints, said: “You feel helpless. They just come in there and beat the hell out of you and do what they want to do.”

In most jails and prisons, policies on the use of force specify in some detail how an extraction should unfold: An officer, for example, is assigned an inmate’s arm or leg and told to keep that limb under control. But once the team goes in, the reality often bears little resemblance to the paper directives, looking more like a barroom brawl than a tightly orchestrated exercise, said Joseph Garcia, a security consultant.

“It’s chaos,” Mr. Garcia said.

His own method, which has been adopted by some jails and prisons, uses only two officers, and they do not enter the cell. The officers use weapons like Tasers and 12-gauge shotguns that fire less-lethal ammunition to subdue an inmate, and then restrain him. The method is not free of controversy, but Mr. Garcia said that the mother of an inmate might prefer that her son receive a bad bruise on a leg or a Taser shock to having him suffer a broken bone, concussion or worse from a traditional extraction.

As jails and prisons become more populated with mentally ill inmates — in some institutions, 40 percent or more of inmates suffer from mental illness — the situations that provoke extractions have increased. In a system ill equipped to handle psychiatric symptoms, the behavior of inmates is often treated as a disciplinary problem.