The District’s medical examiner office has ruled that two D.C. jail inmates died last month of opioid overdoses, raising the question of how inmates were able to access the drugs while incarcerated.

According to an autopsy report released Tuesday, Eric Terrell, 35, who was found unresponsive in his cell May 5, died of an overdose of heroin, the narcotic fentanyl and diphenhydramine, an antihistamine commonly found in cold and allergy medicines often used to cut heroin. Terrell had been jailed since last year on charges of assault with a deadly weapon and robbery.

Kenneth Parker, 28, was found unresponsive in his cell on May 18 and died of an overdose of fentanyl and diphenhydramine, the medical examiner determined. Parker had been awaiting trial in the 2014 shooting of a 9-year-old boy, who survived being shot in the head.

The medical examiner ruled the deaths of both inmates accidental.

Fox 5 first reported on the opioid deaths.

Mainly because of the two deadly overdoses, city officials said they plan to put more drug detection technology in place at the jail.

D.C. Deputy Mayor Kevin Donahue said Tuesday that he hopes to expand the number of drug detection dogs at the facility that check on individuals and mail. He also said the jail is expected to deploy new security machines that would screen visitors and employees entering the facility for drugs.

Donahue was not able to give a time frame on when the new security equipment will be installed. “As soon as we are able to procure it and have it shipped to the District,” he said.

Quincy Booth, director of the District’s Department of Corrections, said officials have been aggressively monitoring for attempts by individuals to smuggle drugs into the jail but said they are prohibited by law from performing cavity searches on individuals, which is one of the means by which drugs are smuggled into correctional facilities.

Last week, Booth said jail officials were “alerted” that a female visitor was planning to smuggle in drugs. Booth said the woman was arrested and the drugs were confiscated.

“Persons found in violation — visitors to staff to inmates to legal community found in violation — will be prosecuted in fullest extent of the law,” Booth said.

Inmates from the medium and maximum security blocks wait to cast their votes at the D.C. jail as part of early voting in the city's election in 2014. (Jahi Chikwendiu/The Washington Post)