Tampa, Florida -- A planned attack on a female prison guard was caught on surveillance camera at the Hillsborough County detention center in Florida.

The Hillsborough Sheriff’s Office released shocking footage Wednesday of an inmate sneaking up behind the prison guard and choking her with a pillowcase. Other inmates rushed to help the guard, who made it out of the incident with mild injuries.

The June 7 incident occurred at around 1 a.m when most of the inmates were asleep.

Deputy Lillian Jimenez was captured in the surveillance video standing in the doorway of a restroom, the New York Post reported. One of the inmates, identified as Bridgette Harvey, 42, approached Jimenez from behind and threw a twisted pillowcase around her neck.

A struggle ensued as Harvey violently tried to strangle Jimenez.

Fellow prisoners jumped out of their beds within seconds and managed to break up the assault.

Warning: Graphic video below.

“At that moment in time, there was obviously loud noises, screams, yelling going on. It woke up a lot of the inmates who were in the pod at that time, a few of them did come around from behind and try to remove the pillowcase from around the neck of the deputy,” said Merissa Lynn with the sheriff’s office, according to WFLA.

Jimenez was able to call for help on her radio during the attack, and other guards rushed to the area.

“The Emergency Response Team escorted Deputy Jimenez out of the pod. Harvey was subsequently secured in restraints and removed … Harvey confessed to planning the assault,” authorities said in a news release, according to Miami Herald.

"Thankfully, she only suffered minor injuries,” the Hillsborough County Sheriff's Office wrote on Facebook.

Officials found Harvey had a comb that had been sharpened into a weapon. She was assisted in the attack by another inmate, 37-year-old April Colvin, who allegedly lured the deputy into the restroom doorway moments before the attack, authorities said.

Sheriff Chad Chronister praised the inmates for rushing to help the deputy.

“While these inmates put our deputy in danger, there were others who did the right thing by coming to her aid, and for that, I am grateful,” Chronister said in the sheriff’s office Facebook post. “Thanks to the quick response of our Emergency Response Team and the inmates who showed compassion to help our deputy, a dire situation turned into the safe rescue of Deputy Jimenez. The assailant and her co-conspirator now face additional charges for assaulting her.”

Harvey was charged with “aggravated battery on a law enforcement officer with a weapon (great bodily harm), introduction of contraband into a detention facility, and escape from confinement (x2),” the sheriff’s office said, according to the outlet.

Colvin was charged with escaping from confinement.

Two other inmates involved in the attack were removed from the pod along with Harvey and Colvin and moved into solitary confinement.

Woman Arrested For Concealing Mother’s Corpse
representational image Getty Images/Douglas C. Pizac-Pool