The inert gas helium and barbiturate drugs contributed to more deaths last year than ecstasy, cannabis, mephedrone and GHB, official figures show.

According to Office for National Statistics data released on Wednesday, the number of deaths mentioning barbiturates increased from six in 2007 to 37 in 2011, the highest number since 1996, despite the number of prescriptions for barbiturates more than halving over this period.

Over the same period, deaths involving helium have risen from two to 42. By comparison there were just seven cannabis-related deaths last year while ecstasy was responsible for 13 deaths. Cocaine claimed the lives of 112 people.

Almost all of those who died taking barbiturate and helium were recorded as suicides. Helium in particular has seen a steep rise in its use. Between 1993 and 2007 just 18 people died using the gas. The gas has become a feature of both literature and public policy debate in the last 20 years as the row over right-to-die has become more intense.

Overall, there were 1,772 male and 880 female drug poisoning deaths – involving both legal and illegal drugs – in 2011, a 6% decrease since 2010 for males and a 3% increase for females.

Over half of all the deaths related to drug poisoning involved opiates. In 2011 heroin or morphine, were involved in 596 deaths.

However, there has been a fall in deaths involving heroin or another opiate. For men the mortality rate has fallen sharply in the last two years, down from 27.9 deaths per million population in 2009 to 17.1 in 2011. This is a 39% fall and is the lowest rate since 1997.

The decrease in deaths has many reasons but ONS points to evidence of a "heroin drought" in the UK, "with shortages in the availability of heroin continuing in some areas in 2011-12" with a result that the street purity of opiates sold has dropped.

Despite fears from drug workers that the low purity levels would lead to overdoses, the reduced supply seems to have led to less demand.

Results from the British Crime Survey, the ONS says, suggest there was a significant decline in the proportion of 16-to-59-year-olds reporting use of heroin in the last month between 2009-10 and 2010-11. This is backed up by evidence from the NHS's National Treatment Agency for Substance Misuse which said that the number of adults newly entering treatment for heroin and crack use has fallen by 15% in two years.

"[The data] suggests that this decline is probably due to reduced demand rather than any shortfall in services. These factors may explain the decline in deaths involving heroin/morphine that has been seen over the last couple of years," said the ONS.