It was a prison break. But it was one that authorities welcomed.

A group of inmates in a holding cell at a Texas courthouse recently busted loose, after the officer who was guarding them collapsed and stopped breathing.

A group of inmates in a holding cell at a Texas courthouse recently busted loose. And the head of the local police force is praising them for it. 1:10

Mark Arnett is the captain of the Parker County Sheriff's Office.

"Immediately, the inmates began yelling and hollering," he tells As It Happens guest host Susan Bonner. "It saved his life, without a doubt."

A prisoner shouts at the courthouse surveillance camera, as other inmates try to help the sick guard. (Parker County Sheriff's Office)

The inmates were shackled at the waist and they had on leg irons and handcuffs, so their movements were restricted. But they managed to use the guard's radio to try to call for help.

People like to think that everyone in jail is a bad person. That's just not the case . . . They still have emotions and conscience and morals. - Cpt. Mark Arnett, Parker County Sheriff's Office

Arnett points out that the guard was armed and had keys, so the prisoners could have unshackled themselves and tried to escape. One inmate, Nick Kelton, told a local TV station he was worried the other officers might think just that.

"There was a large risk to these inmates for doing what they did," Arnett says.

When help did arrive, the other officers returned the inmates to their cell and called 9-1-1. The collapsed guard had no pulse, so a colleague started giving him CPR.

After the prisoners were returned to their cell, an officer gives the guard CPR. (Parker County Sheriff's Office)

The guard has now recovered. He returned to work on Monday and hopes to be able to tell the inmates how grateful he is for their assistance.

Arnett says he isn't surprised the inmates stepped up to help.

"People like to think that everyone in jail is a bad person. That's just not the case. There are bad people in jail, don't get me wrong. But there's also people in there who've just made a mistake or made a bad decision and now they're going to have to pay the consequences, but they're still human. They still have emotions and conscience and morals."

He hopes that as they reflect on what happened, the prisoners will be proud.

"They can say something to themselves that not a lot of people can say — that their actions definitely saved the life of another person."

For more on this story, take a listen to our full interview.