Time off for good behavior indeed.

Six convicts are getting their sentences shortened after saving a guard who collapsed on duty last Monday in Polk County, Georgia.

The deputy, who wished to remain anonymous, collapsed during a work detail at a local cemetery with six inmates who he'd grown to know well from working alongside for seven hours a day, five days a week, reported NBC Atlanta affiliate WXIA.

"I started coughing spells, and every time I got those, I'd get hotter," the deputy told the station. "It was just harder to keep up... I just finally went down after a couple of minutes doing that."

As soon as the officer dropped, the six inmates he was overseeing came to his aid. They removed the officer's outer bulletproof vest to help cool him off and took his phone to call 911, according to a statement released by the Polk County Sheriff's Office on Friday.

"None of my guys ran," the deputy told WXIA. "None of them did anything they shouldn't have done."

Greg Williams, one of the inmates, said the deputy was unconscious for about a minute and was struggling to breathe. "When he started breathing, it was just real heavy and real fast," Williams said.

Thanks to the inmates' quick response, EMS arrived at the scene shortly after and took over.

The sheriff's office called the act "heroic" in their statement, and said the happy ending was celebrated with lunch in the park and desserts prepared by the deputy's family.

The inmates from Polk County, Georgia who helped save the life of a sheriff's deputy. One used the guard's work phone to call 911 while others removed the correctional officer's bulletproof vest so they could perform CPR and help cool him off. Deborah Tuff / 11 Alive / WXIA

In addition to the celebratory meal, Polk County Sheriff Johnny Moats told the stationthat he will shorten the inmates' sentences by about 25 percent.

"Anytime we have a trustee or inmate crew that goes beyond normal duties, we cut them some extra time off," the sheriff said.

Related: Texas Inmates Break Out of Cell to Save Guard Who Stopped Breathing and Collapsed

The fallen deputy said in an interview with WXIA that high humidity could have been the culprit for his collapse. He suffers from chronic Chiari malformation, a condition that impairs the flow of fluid in the brain and spinal chord, which can result in headaches and dizziness. He has since been taken off of work detail and placed on patrol, the station reported.

But for Williams, helping the officer was not about getting anything in return.

"When that happened, in my opinion, it wasn't about who is in jail and who wasn't," Williams said, "It was about a man going down and we had to help him."