At least eight prisoners broke a locked door to come to the aid of a jail guard who slumped over after suffering an apparent heart attack.

A Parker County jailer was joking with the prisoners June 23 in a basement holding cell at the courthouse when he suddenly passed out, according to WFAA.

"He just fell over. (It) looked like an act," inmate Nick Kelton told WFAA. "(He) could have died right there."

Kelton and other inmates started yelling for help. Then they managed to break out of the holding room and run to the guard.

"(We were) worried they're going to come with guns drawn on us," Kelton told WFAA Thursday.

>> Read more trending stories

The guard, who works for a private contractor and did not want to be named, had no pulse.

Deputies who were upstairs in court rushed down thinking that it was a fight. The deputies got the inmates back into the cell, started CPR and called paramedics who shocked the guard, according to WFAA.

The guard regained a pulse. He is expected to return to work next week, according to WFAA.

The prisoners likely saved the guard's life.

"He could have been there 15 minutes before any other staff walked in and found him," Parker County Sheriff's Capt. Mark Arnett told WFAA.

The holding cell from which the inmates broke free has been reinforced.