It happened after a Durham police officer arrested Hector Sosa Arias last month, on driving while license revoked and cocaine possession charges.
Eyewitness News has learned that his prints are on the pistol that was found inside a restroom near the jail intake area--after he bonded out.
"Perhaps a proper search wasn't done," said Captain R.D. Buchanan of Durham Sheriff's office. "And the first person who was in jeopardy is the one who arrested the individual."
Also at risk: unarmed workers inside the jail who told me off camera they feared for their safety. They want to know how the prisoner managed to get the gun inside the building.
Durham's deputy police chief Ron Hodge wants to know, too.. "Our information is the individual was frisked before he was brought to the magistrate's office. The weapon was on his person, was not found," said Hodge.
Captain Buchanan of the sheriff's office told us while a metal detector used in the intake area should have caught the gun, "the handcuffs would have set the alarm off. But you can't take that for granted, that it's just the handcuffs, and you should do another search."
And who searched Sosa Arias?
"The arresting officer was a female officer who did not search the individual," said Hodge. "She had a male officer search him."
He'll be grilled by his supervisors, who want to know how he missed the gun's hiding place.
"Is this someplace we need to look where we didn't look, in this case, so that we don't have this happen in the future?" asked Hodge.
His department's conducting what he calls an informal internal investigation of the gun incident. He told us that investigation doesn't necessarily mean any changes in the way Durham police process prisoners before they get to the county jail.
"I don't think we need to change the procedure," said Hodge. "I think we need to treat this as a learning experience, to avoid similar situations in the future."