SAN DIEGO — Two men in law enforcement custody were saved from drug overdoses Tuesday at the George Bailey Detention Facility in Otay Mesa, authorities said.

An alarm alerted deputies with the San Diego County Sheriff’s Department around 10 p.m. that someone had accessed the lifesaving medication Naloxone, also known as Narcan, the agency stated in a release Wednesday.

Upon arrival, authorities found several inmates helping the victim, who was given a couple doses of Naloxone, the sheriff’s department said.

The man was rushed to the medical unit at George Bailey, where he was given more Narcan before he was taken to a hospital for treatment, according to authorities.

While deputies were at the housing unit, another man appeared to show symptoms of an opioid overdose, the sheriff’s department said. He was also sent to the medical unit and given Naloxone before being taken to a hospital.

Both men were treated and are now back in custody.

A sheriff’s deputy and his K-9 partner later searched the housing unit, finding a substance that tested positive for fentanyl, authorities confirmed.

Narcan is a nasal spray that rapidly reverses and blocks the effects of opioids or narcotics in the body so a person can breathe normally again.