TEHACHAPI, Calif. (AP) — California officials say they had to use batons and pepper spray to stop a prison inmate from beating his unconscious cellmate, who later died.

Officials said Tuesday that guards at the California Correctional Institution in Tehachapi found 29-year-old Joshua Powers beating 37-year-old Kevin Mansfield, who was face down on the floor and seemed unconscious.

He kept beating Mansfield even after he was pepper-sprayed, until guards entered his cell Friday to subdue him.

Powers was treated at an outside medical facility for an injured hand and swelling around his eye.

He is serving a 33-year sentence from Tuolumne County for kidnapping, using a deadly weapon, false imprisonment, robbery, burglary, and criminal threats of violence, all by a repeat offender.

Mansfield was serving a life sentence for second-degree murder from Riverside County.