The number of people who died due to drug misuse in Scotland last year fell by 279 to the lowest level for five years.
Figures from National Records of Scotland show 1,051 people died of drug misuse in 2022.
It is the first significant drop following several years of record high totals.
However, Scotland continues to have the worst drug death rate in the UK and the rest of Europe.
Despite the fall in drug misuse deaths, they are still more than three times as common as they were two decades ago.
Opiates and opioids, including heroin, morphine and methadone, were implicated in more than eight out of 10 drug-related deaths in 2022.
The majority of drug misuse deaths were classified as accidental poisonings, with 7% classed as intentional self-poisonings.
The rate of drug poisoning deaths in Scotland was 2.7 times as high as the UK average in 2021, the most recent year that data is available for the UK as a whole.
Julie Ramsay, head of demographic statistics at National Records of Scotland, said drug deaths had been rising for two decades, with a particularly sharp increase after 2013.
The latest statistics are the biggest year-on-year decrease since recording began in 1996, she said.
"Those living in the most deprived areas of Scotland are almost 16 times as likely to die from drug misuse compared to people living in the least deprived areas," Ms Ramsay said.
Males are twice as likely to die from drug misuse than females, Ms Ramsay said, and the age profile of drug misuse deaths has become older, now averaging 45.
Over the past two decades, drug misuse deaths in Scotland has increased most years, with the largest rise in 2018.
The highest number of drug misuse deaths on record was in 2020 where there were 1,339 deaths (25.2 per 100,000 people).
The figure for 2022 was 19.8 deaths for every 100,000 people in Scotland.
Where are the worst drug death rates?
The Glasgow City Council area had the highest rate of drug misuse deaths over a five-year period (44.4 per 100,000) closely followed by Dundee City (43.1).
The lowest rates over the same period were in East Renfrewshire (9.5) and Aberdeenshire (11.1). Orkney Islands and the Western Isles both had fewer than 10 deaths over the time period so no rates were calculated
What causes most drug deaths in Scotland?
The vast majority of drug-related deaths in Scotland are of people who took more than one substance, so-called poly-drug use.
Heroin, methadone and other opioids were implicated in 867 deaths but often in combination with other drugs such as "street benzos".
Benzodiazepines such as diazepam and etizolam can be prescribed for anxiety or insomnia but the vast majority of the 601 deaths linked to them were from illegally obtained drugs.
Experts say high-risk opioid users typically misuse benzodiazepines to self-medicate or increase the effects of heroin or methadone. They also take benzos to treat symptoms of psychiatric disorders, negative emotional states and withdrawal symptoms.
Gabapentin and/or pregabalin - drugs used by doctors to treat epilepsy and nerve pain - were implicated in 367 misuse deaths.
Cocaine was involved in 371 deaths.
Is this the first sign of the tide turning? Those on the frontline of Scotland's under-pressure addiction services will certainly hope so.
Last year's significant fall in fatal overdoses follows a period where Scotland's unenviable record placed it among the worst in Europe for drug deaths.
That prompted international focus on what exactly went wrong in Scotland.
But it also led to £250m spending on trying to solve a crisis that has its roots in decades of social deprivation - just look at the difference in the death rate between the poorest and most affluent areas of the country.
Rehab provision is increasing. Emergency services are carrying Naloxone, a nasal spray which can reverse the effects of an opioid overdose - and services are reaching non-fatal overdose sufferers within hours, with one NHS clinic in Glasgow seeing 600 people in the first six months of last year.
Has this made the difference? Analysis of the so-called National Mission will follow, picking apart what has been working and what hasn't.
The threat remains, however, as synthetic opioids are making their way into the heroin supply, while the make-up of "street" Valium is changing as well.
In the last decades of the 20th Century, Portugal was in the grip of a heroin and HIV crisis.
It responded by decriminalising the possession of drugs for personal use, an idea which SNP ministers in Edinburgh are now proposing for Scotland.
The Conservative government in London, which controls the regulation of drugs, is opposed to the idea, but could it work?
Although possession of a limited amount of any drug is not a crime in Portugal, it is not legal either. Users can be referred for treatment and counselling, fined or sanctioned.
There are concerns that decriminalisation normalised drug use among young people and entrenched criminality.
But advocates of the policy say it has been a huge success in shifting drug users - and the resources to deal with them - from the criminal justice system to the health service.
There is no mainstream attempt to reverse the policy and, although Portugal has almost double the population of Scotland, it has vastly fewer drug deaths.
Still too high
Scotland's drug policy minister Elena Whitham said: "While I am pleased to see that hundreds of families have been spared this agony and lives have been saved, every life lost is a tragedy and the number of deaths is still too high."
She said minister would never underestimate the scale of the challenge they continue to face, including responding to new threats such as synthetic opioids and stimulant use.
Scottish Conservative leader Douglas Ross said the latest numbers indicate some progress from an "utterly catastrophic base" but Scotland remains the drugs-death capital of Europe by an enormous and alarming distance.
"SNP ministers have a duty to explain why, in Nicola Sturgeon's words, they took their eye off the ball as this national emergency spiralled out of control and cut money from drug treatment programmes," Mr Ross said.
After the crisis reached record levels in 2021, the Scottish government announced it would be spending £50m more a year on tackling the drugs crisis.
This includes funding for local alcohol and drug partnerships, as well as grassroots community organisations and improving standards for methadone prescribing.
In Glasgow, one of the initiatives is the enhanced drug treatment service - also known as heroin assisted treatment.
At the moment, the service caters to 25 patients who are prescribed diamorphine - or heroin. They then inject the drug under supervision and are given after-care.
Service manager Lynn MacDonald told BBC Scotland News the aim was to plug them into other services such as housing and other medication.
She said: "They attend the service at least daily - most of them twice a day. And that's seven days a week, 365 days a year.
"We are in the process of increasing our numbers. We are aiming to work up to about 40 people attending."
The service costs around £1.3m a year to deliver.
The Scottish government also supports decriminalising drugs for personal use - believing this would better develop a "public health" approach to tackling the problem.
'Right to Recovery'
The government also aims to provide 1,000 residential rehabilitation beds a year from 2026. It says it wants to spend more than £100m on improving access.
But others say not enough is being done to reach that number.
The Scottish Conservatives - in co-operation with advocacy groups - are developing a Right to Recovery Bill to be introduced at Holyrood later this year.
This would enshrine in law a person's right to be given whichever treatment option they prefer, from rehab to medical assisted treatment.
Douglas Ross, the leader of the Scottish Tories, said: "One of the biggest issues facing those with addiction problems is accessing treatment.
"That's why the Right to Recovery Bill I'm taking through parliament is crucial - as it would enshrine in law the right of everyone to receive the potentially life-saving treatment they need - and why it is backed by experts, charities and those with lived experience.
"Humza Yousaf made encouraging noises about supporting the bill during the SNP leadership election but has been quiet since.
"Worryingly, he appears to be advocating the decriminalisation of drugs instead."
'This wasn't possible six months ago'
David has spent most of his adult life addicted to heroin.
Sleeping rough and using other drugs including cocaine and street valium, he was admitted to the charity Turning Point's stabilisation centre earlier this year.
Now the 45-year-old has been drug-free since February.
Earlier this month, BBC Scotland news filmed David as he prepared for a stage show with the Recovering Voices project.
The project is delivered by the Creative Change Collective and is funded by £400,000 of Scottish government money in four local council areas.
David performed at Oran Mor in Glasgow in front of 200 people.
Afterwards, he said: "Something like this wasn't possible six months ago. I was under seven stone and just by chance, I got into the stabilisation unit.
"That saved my life. I'll not stop doing stuff like [the stage show].
"I feel amazing."
- Scotland drug deaths
- Drug use
Could decriminalisation solve Scotland's drug problem?
3 days ago
Scottish government wants drug possession to be decriminalised
Drug deaths down for first time in eight years
28 July 2022