An earlier version of this article was published with ONS 2014 figures.

Despite falling drug use, record numbers of people are dying in drug-related deaths in the UK. What’s behind the trend? Some newspapers have suggested that the rise in deaths is due to rising drug use among the affluent and the rising purity of illegal party drugs, and there has been much concern over new psychoactive substances, but does the data back up these claims? A deep dig into the evidence suggests that the reality is far more complicated.

The group of drugs leading the rise in drug-related deaths by a considerable margin are opiates, which are responsible for over half of all drug-related deaths. Opiates such as heroin are not a group of drugs typically known for being the drugs of choice of wealthy young party goers. However, increasingly, abuse of prescription opiates driven by aggressive marketing of opiate medication in the US, is drawing new users to drugs that historically have been used by the most down-trodden in society. In Canada a surge in opiate-related deaths has been attributed to a synthetic opiate that is both more toxic and more addictive than heroin. In the UK these drugs don’t appear to have had such an impact. Instead, here the recent rise in deaths have been attributed to a long ‘drought’ in heroin that occurred around the year 2010, which led to street heroin falling in purity. Now that purity levels have returned, British heroin users have been overdosing on the same quantities that they took a couple of years ago.

In 2015, the most recent year that data is available for, 1989 people died in England and Wales after taking opiate drugs including heroin, morphine, methadone, tramadol and codeine. This dwarfs the numbers of people who have died taking virtually any other type of drug. After reaching its last peak at the turn of the century, deaths related to opiates are back on the rise in England and Wales and a further public health crisis could be on the horizon if synthetic opiates gain the popularity in the UK that they have acquired overseas.

Next on the list is anti-depressants, which were associated with 447 deaths in 2015. While the risk of overdose from anti-depressants is real, like many drugs deaths, it isn’t always clear what proportion of deaths linked to anti-depressants were suicides and to what extent the anti-depressants themselves may have played a direct role. 366 people died in 2015 after taking benzodiazepines which is the next group of drugs on the list, followed by cocaine which was responsible for 320 deaths, and amphetamines, which were responsible for 157 deaths.

Interestingly, both cocaine and amphetamine deaths fell to less than half the number that they are are now responsible for in 2010 and 2011, years when many users of these drugs had switched to the then legal and then generally pure alternative, mephedrone which Les King former senior chemist to the Government’s Advisory Council on the Misuse of Drugs (ACMD) estimated to have a fatal toxicity of less than 10% of cocaine. This trend was particularly prevalent in the armed forces where soldiers switched from cocaine to mephedrone to avoid coming up positive in drugs tests. Since the ban of mephedrone, cocaine and amphetamine deaths have returned with a vengeance.

Deaths related to MDMA (ecstasy) have risen over recent years, attracting much newspaper coverage, but while tragic, the 57 people that died in 2015 after taking MDMA still represents only a tiny fraction of the total number of drug-related deaths. If we were to compare this number with the 8697 people who died in the UK in 2014 after drinking alcohol (2015 figures haven’t yet been released for alcohol deaths), the number is truly put into perspective.

There is evidence that the purity and strength of MDMA crystals and ecstasy tablets is increasing to record highs, which translates to dangerously high dosages present in the strongest pills that are currently in circulation. This certainly increases the risk of overdose in users who are not aware of the trend; but there is no evidence that the rise in purity of these drugs is behind the overall rise in drug-related deaths. To the contrary, there is strong evidence that the opposite is true. That’s because, following close on the tail of MDMA is PMA, a common, cheap, and exceedingly toxic formerly legal drug that is often sold to unsuspecting ravers under the guise of “ecstasy”. PMA was responsible for 10 deaths in 2015, down from 24 in 2014, which makes PMA now responsible for a sixth of all ecstasy-related deaths, down from a half last year, but just five years ago that number was zero. The drug is particularly dangerous because not only does it take far less of it to kill someone than MDMA, but the time it takes to have any effect is longer, leading clubbers who think they’ve been sold ecstasy to redose and consequently to overdose. Technically, PMA has been banned since way back in 2002, however this has not stopped PMA-related deaths.

Another factor blamed for contributing to the rising number of drug deaths is the rise in new psychoactive substances. Over recent years, governments around the world have played whack-a-mole with backstreet pharmacists who have created new drugs that often aim to mimic existing banned drugs, often with far less predictable and far more harmful consequences. In 2011, 22 people died after taking new psychoactive substances, in 2015 that number was 144. This year the Government took the unprecedented step of banning all psychoactive substances that are not explicitly listed as legal – such as tea, coffee, alcohol and incense used in churches. The move has been described as “one of the stupidest, most dangerous and unscientific pieces of drugs legislation ever conceived”.

It’ll be at least another two years before we find out whether this new law may have had any impact, but there’s a significant risk that it could backfire. It’s difficult to imagine that the vast volumes of new psychoactive drugs that have been produced will just disappear. It’s likely that they’ll find their way on to the black market as either cutting agents or on in clear plastic bags of miscellaneous white powder sold anonymously on street corners, where it’s far less likely that the people buying them will have any idea what they are taking. This will mean that they will have no indication of how much to take, what not to mix them with, or what to tell the doctor when someone who takes them overdoses and are rushed to A+E. It seems we’ve learned nothing from the deadly and ongoing legacy of PMA.

While there is evidence that rising purity of substances can lead to rising deaths due to overdose, concluding that purity itself is at the core of the problem is short sighted – it is the unpredictability of the purity and contents of drugs inherent in any black market that turns something from dangerous to deadly. The rise in deaths is tied to a failure to regulate, a failure to legislate and a failure to educate.

But there have been signs of positive change. We’ve seen drug testing for the first time at a British festival this year at Secret Garden Party. The move resulted in one in four of those who tested their drugs binning them after discovering their true contents, a simple step that really could have saved lives. This isn’t something we’ll see elsewhere unless other police forces subscribe to this more progressive, harm reduction centred approach. In Portugal, this has been taken a step further with the decriminalisation of all drugs, a move that has drastically reduced drugs deaths to a tiny fraction of the rate in the UK, it has also led to a precipitous fall in new cases of HIV.

Perhaps, the question we should really be asking is why are people taking drugs in the first place? That’s a question with no simple answer, but the answer likely forks in two directions. For drugs such as heroin that make up a minority of drug use but drive the majority of drugs deaths, use is strongly tied to poverty, social depravation, and increasingly prescription drug abuse. To reduce harmful drug use, we need to solve the problems that lead people fall into problematic patterns of use with these drugs in the first place.

For drugs in general, there is actually evidence that more intelligent people are far more prone to illegal drug use. This may be due to intelligence being linked to a sense of openness to experience; it could be due to intelligent people being more able to understand the true risks of certain illegal drugs relative to deadlier drugs like tobacco and alcohol, and taking what they see as the safer option. Such people may have found it easier to use drugs over recent years as new online markets have appeared that mean they no longer have to know or interact with drug dealers in person. But contrary to media hype, these market places have probably made taking drugs safer, by introducing the same mechanisms that reduce fraud and theft on Amazon and ebay, reducing risk in the process.

Clearly there are a multitude of reasons people take drugs, but one thing this is certain. People will always use drugs, and the only way to stop people dying from taking drugs is by reducing the harms that accompany drug use, harms that at present are greatly increased by the law as it stands. As has been demonstrated in other parts of the world, regardless of what is causing the trend in rising drug deaths, that trend can be reversed by taking drugs out of the hands of police and criminals and putting them back into the hands of doctors.

As this sea change may be a long way away, one thing that we can all do to help is to educate ourselves, starting with the dangers of prescription drugs. Just because a drug comes with a prescription doesn’t mean that it is safe. If we are prescribed opiate pain killers or benzodiazepines it’s vital that we understand that these drugs are both highly addictive and some of the most dangerous drugs in existence. Like many drugs, opiates and benzodiazepines are particularly deadly when mixed with alcohol, a substance that was involved in fully a third of all drug-related deaths. A simple rule to help stay alive is to never get drunk if taking drugs, a harm reduction message that has never been adequately delivered, perhaps because it undermines the entire foundations of the war on drugs, which depends on us seeing socially acceptable drugs as less dangerous than illegal drugs, when in reality that often simply isn’t the case.

Simon Oxenham is a freelance science writer specialising in psychology and neuroscience. He writes a column for New Scientist and a blog for Big Think, but has been featured in many publications including The Psychologist and The Guardian. Tweets @neurobonkers