Scotland's prisons have seen a surge in drug seizures during the pandemic, new figures show.
There has been an 18-fold increase in stoppages of so-called street Valium in the space of a year, while seizures of psychoactive substances have nearly doubled.
Illegal substances often get inside prisons through drug-soaked clothing or letters before being smoked.
The Scottish Prison Service said it has invested in new ways to detect drugs.
One expert said more prisoners may have turned to drugs during the pandemic as family visits were stopped.
A spate of drug overdoses at HMP Shotts in North Lanarkshire in recent weeks have been linked to new psychoactive substances.
These substances, such as synthetic cannabinoid "Spice", and "street" benzodiazepines, such as Etizolam, are now thought to be the dominant drugs in prisons.
One serving officer at a large Scottish jail, speaking to BBC Scotland anonymously, said: "The prisoners don't know the strength of this stuff from one batch to another, so it's proper Russian roulette territory.
"Detection is difficult when its sold in postage-stamp sized quantities and then cut up even smaller.
"It's hard to deal with at times, especially when prisoners are so unpredictable, but you have to remember it's no different to what you are seeing on schemes up and down the country."
Figures released to BBC Scotland under freedom of information laws show there were 229 recoveries of suspected psychoactive substances across the prison estate in June 2020.
In June of this year there were 421 such seizures.
For Etizolam, there were 11 recoveries by wardens in jails across Scotland in June 2020 but 198 in the same month this year.
The quantities of drugs involved in each incident was not released.
Etizolam is a benzodiazepine known as fake Valium and is many times stronger than prescription drugs.
These substances are a major factor in Scotland's wider drugs deaths problem and this is also reflected in prison fatalities.
Of the 20 drug-related deaths in Scotland's prisons since 2016, 12 involved psychoactive substances and six Etizolam.
'Difficult to detect'
David Mackie, a retired sheriff and chairman of penal reform charity Howard League Scotland, warned the drug trade in jails was having an "impact way beyond the walls of the prison".
He said: "If somebody is in prison being supplied with drugs which are costing three to five times what they cost outside, how is that person paying for that drugs? Because he won't have the money in prison.
"It is almost certain that person's family may be put under pressure to either raise the money and pay for the drugs or do something for the organised crime groups."
Mr Mackie added that for "those participating in the trade it seems to be quite a safe and lucrative occupation, there seems to be little risk of prosecution."
A spokesman for the SPS said it treats the issue of smuggling drugs into prisons "very seriously" and the service had "invested in technology to better detect suspicious substances and work closely with partner agencies to garner relevant intelligence".
He added: "The particular problem of psychoactive substances is impacting on the whole of our society, not just the prison system. These substances are sometimes difficult to detect and their use can be lethal.
"We have over the last few years pointed out on many occasions, to those in our care, the dangers of using such substances. If we suspect that an item many contain such materials, then we quarantine them and do not allow them to enter a prison."
'My wee ma's proud of me - first time I can say that'
Joey McGuiness is a recovering cocaine addict being supported by the Glasgow-based Sisco charity which delivers drug recovery services for people in and out of the prison system.
The 34-year-old spent five weeks in the city's Barlinnie prison and said most of the people he met there had drug addiction issues.
"It's very easy to get drugs in prison," he says.
"I used to see people in the morning and they were alright but by lunchtime they were a completely different person.
Joey admits he was tempted to take drugs in prison "to escape" but stopped himself as he was grappling with taking the first step to ending a cocaine problem which he says had taken over his life.
A near fatal-overdose months after leaving prison in 2019 was the moment when Joey first admitted he was a cocaine addict and began his road to recovery.
Now 10 months clean, Joey is enjoying life without drugs and repairing relationships with his family.
"My wee ma's proud of me today. First time I can say that," he says.
"When I used to go into my mum's house she used to have fear on her face but when I go in today it's a smile."
Leeh Howell, of Sisco, says Joey's experience of drugs in prison is common and thinks the problems have got worse since the start of the Covid pandemic.
He said: "It's not really stopped substances getting into the prison.
"I think with things like family visits being stopped, all the feelings and thoughts that they've been sitting with have been amplified and it's making it that much harder to not take substances."