Sometimes help comes from the most unlikely of sources.

Three inmates at the Gwinnett County Jail in Georgia are being credited with helping to save the life of a sheriff’s deputy who was apparently suffering heart trouble, according to a report.

Deputy Warren Hobbs appeared to be sleeping while on duty recently but inmate Mitchell Smalls noticed something strange about the way the deputy was seated in his chair – and the sounds he was making didn’t seem like normal snoring, Atlanta’s FOX 5 reported.

TEXAS SURFER, 67, HELPS SAVE 2 WOMEN FROM HANNA'S ROUGH WATER: REPORTS

Then Hobbs suddenly fell to the floor and started bleeding from his head.

That’s when Smalls took action.

“I started hollering and screaming and banging on the door to try to alert everybody to wake up,” Smalls told the station.

Soon about 60 inmates were making noise, trying to get help for the deputy, the report said.

Instead, the noise helped Hobbs regain consciousness – and the deputy managed to hit a button that unlocked the cells of inmates Terry Lovelace and Walter Whitehead.

Three inmates of the Gwinnett County Jail in Georgia have been credited with helping to save a deputy's life. (Gwinnett County Jail)

Whitehead used a phone to call for help and Lovelace used the deputy’s radio to do the same, FOX 5 reported.

Soon help arrived and Hobbs received the medical attention he needed. He is now recovering at home.

Whitehead told FOX 5 he just did what the situation called for.

“I don’t care if it’s a police officer or whoever it was,” he said. “I will do whatever I can to save a man. I don’t want anyone to die.”

CLICK HERE TO GET THE FOX NEWS APP

In a statement, the sheriff’s office said that unlikely bonds can develop between inmates and law enforcement officers – who often share long hours in the same place, on different sides of locked doors.

“Many people have strong opinions about law enforcement officers and criminals,” the statement said, “but this incident clearly illustrates the potential goodness found in both.”