The imposing, castle-like façade of the Lancaster County Prison has for over 165 years kept thieves, rapists, killers and other criminals locked away from the public. But as the opioid addiction crisis continues to plague this rural Pennsylvania county, prison officials are increasingly becoming just as concerned about what gets by the correctional facility’s turreted walls as what's inside them.

Black tar heroin was recently discovered in an intake area for new inmates. A syringe was found in a common area that same day. Stashed in everything from lip balm and greeting cards to rubber gloves and hollowed out cigars, officials say that heroin, fentanyl and prescription opioids are being smuggled into the prison at record levels.

“There is no doubt that what you see in the community, you see in the prison to a heightened degree,” Lancaster County Commissioner Josh Parsons told Fox News. “We’re seeing this all across the demographics: old, young, rich poor. It doesn’t matter.”

While drug use behind bars is far from a new phenomenon – jailbirds trading everything from cigarettes to sexual favors for dope is part and parcel of prison lore – the devastating opioid epidemic hitting the U.S. has flooded jails across the country with addicted inmates and created new addicts, who upon release are forced by their drug habit back into a life of addiction

“The saying is ‘if you don’t have a drug problem going into prison, you’ll have one leaving,'” Tony Papa, a spokesperson at the Drug Policy Alliance who spent 15 years behind bars in New York on a drug charge, told Fox News.

According to a study published in the journal “Addiction Science & Clinical Practice,” approximately one-third of all heroin users pass through correctional facilities every year and up to one-quarter of inmates in the country’s more than 5,100 jails and prisons have an opioid use disorder.

In Lancaster, prison officials say the number of inmates incarcerated on drug-related crimes hovers somewhere between 80 and 90 percent. Pennsylvania is one the state’s hardest hit by the opioid crisis, with 4,642 people dying from drug overdoses in 2016.

"This epidemic is not slowing down," Lancaster County District Attorney Craig Stedman said earlier this year in a press release. "Take a look at your town and your friend's town. The proof is there."

Prison officials across the country are taking two main approaches to stemming the use of opioids behind bars.

The first is ramping up efforts to monitor who and what comes into the prison and how the prisoners communicate with family and friends.

Lancaster County officials have decided to cease all contact visitations with prisoners later this months in order to prevent outsiders sneaking in contraband. Starting August 14, inmates will have to communicate with their loved ones through a wall of thick glass and conversations will be held over phones.

"This is about keeping Lancaster County Prison safe,” Warden Cheryl Steberger said, according to local media.

These crackdowns may prevent friends and family of inmates from “keistering” or “boofing” drugs – the act of smuggling drugs and other contraband into prison by concealing them in a certain body cavity – but there are still many other ways to get the goods past the guards.

There have been reports of people tossing tennis balls filled with heroin over the fencing near the prison yard and of drones dropping off drug bundles which prisoners quickly snatch up during their daily exercise, but the most tried and true way is through corrupt officials.

The saying is ‘if you don’t have a drug problem going into prison, you’ll have one leaving.' — Tony Papa, a spokesperson at the Drug Policy Alliance

Inmates have bribed everyone from guards and laundry workers to the mailroom staff and jailhouse ministers to help them get heroin to the general population. Once inside, half a bag of heroin that goes for $5 on the street will cost $40 and a single pill of the prescription opioid OxyContin will net a dealer anywhere between $60 and $80.

“The drug of choice for most inmates is still heroin,” Papa said. “But Suboxone, OxyContin and other prescription meds are also flooding prisons right now.”

While prescription opioids may have gotten many people hooked on heroin and locked up in the first place, they may also be the key to helping them kick their habit and stay clean once released.

A number of studies over the last two decade have noted the effectiveness of opioid replacement therapies (OMT) in helping inmates stay clean once released.

Prison officials are wary of both methadone and Suboxolene, a combination of buprenorphine and naloxone that work by reducing cravings and preventing withdrawal symptoms, because in large enough doses they can get people high and the latter is frequently smuggled into lockups. Researchers, however, point to their work and say that criminal justice workers don’t encounter those ex-cons helped by the drug because they don’t return to jail.

"People working in the criminal justice system sometimes encounter individuals on methadone or buprenorphine (the generic name for Suboxolene) who have been reincarcerated, and some may see this as a failure of the medication rather than viewing relapse as a symptom of a chronic disease," Josiah Rich, the director of the Center for Prisoner Health and Human Rights at Rhode Island’s Miriam Hospital, wrote in a research paper. "They may not see the many individuals who are stable on these medications and leading productive lives outside of prison."

A study from 2001 of inmates at New York City’s Rikers Island, which started the country’s first prison-based methadone program in 1987, found that upon release ex-cons who completed the program were less likely to commit crimes and more likely to continue to receive treatment. A 2014 study in Australia also found these types of treatment led to fewer overdose deaths after release.

There are less than 30 prisons across the country that offer opioid replacement therapies.

Many, like Lancaster County Prison, have instead started to use the single-shot, anti-relapse drug Vivitrol – whose effectiveness is still being tested – in an effort to help addicts control opioid cravings a few days before they are released. Prisons have also expanded the supply of the heroin antidote Narcan to the mailroom and intake areas in case of accidental overdoses.

Despite all of these efforts, there seems to be widespread agreement that drug use will always be a fact of life inside prisons.

“I served a 15 year sentence,” Papa said. “When you’re in prison you want to do something to get away, so you take drugs to do that and to forget the hell you’re living in.”