The "Trainspotting generation" in their 40s are now most at risk of death from drugs, ONS data shows.

Figures show that for the first time those aged between 40 and 49 have the highest incidence of drug-related deaths, overtaking those in their 30s.

Deaths reached an all-time high of 3,744 in 2016, an increase of 70 from the previous year.

Rosanna O'Connor, director of drugs, alcohol and tobacco at Public Health England, said: "Many of these deaths can be explained as the ‘Trainspotting’ generation, often with poor physical and mental health, sadly losing their battle with long term addiction to drugs."

While heroin deaths plateaued following a spike in 2015, cocaine-related deaths increased from 320 to 371.

The ONS said this was partly down to an increase in purity, as there had not been a significant rise in the number of people using the drug.

It report said: "The National Crime Agency reports that there was a significant increase in both crack and powder cocaine purity at all levels in 2016, including user-level, which may partly explain the increase in deaths relating to cocaine."

However, leading addiction researcher Professor Sir John Strang, of King's College London, said that the high number of heroin deaths also raised concerns.