The Taliban terror group is controlling part of the heroin production in Afghanistan to fund its activities, according to Western officials.

The Sunni fundamentalist group took control of Afghanistan in 1996, imposing a strict version of Islam and persecuting anyone who would not abide by their laws. Although Taliban rule ended following the US invasion in 2001, its insurgents still control some areas of the country.

The group banned poppy cultivation when it ruled the country. However, Western officials believe it is now running its own factories, where it refines poppies into morphine and heroin before selling the drugs to fund its insurgency.

"I pretty firmly feel they are processing all the harvest," William Brownfield, US Assistant Secretary for Drugs and Law Enforcement, told reporters in the Afghan capital Kabul, according to AFP.

"Everything they harvest is duly processed inside the country. They receive more revenues if they process it before it has left the country. Obviously we are dealing with very loose figures, but drug trafficking amounts to billions of dollars every year from which the Taliban is taking a substantial percentage."

Afghanistan is thought to be the source of 90% of the world's opium that is then used to produce heroin. Once poppy seeds are refined into heroin, the Taliban sells the drug in regional markets for between $2,300 (£1,764) and $3,500 a kilogram, another official, who spoke to AFP on conditions of anonymity, explained.

By the time the drug reaches Europe, the Taliban wholesale it for $45,000, the source continued.

A 2016 report by the UN Office on Drugs and Crime (UNODC) found that several regions across the country witnessed an rise in opium poppy cultivation and production had increased by 43% since 2015.

The UN report attributed the increase to warm weather and heavy rainfall. "The survey shows a worrying reversal in efforts to combat the persistent problem of illicit drugs and their impact on development, health and security," UNODC executive director Yury Fedotov said at the time.

The Taliban has claimed responsibility for several attacks across Afghanistan - mostly in Kabul – in the past few months. Afghan officials allege the group joined forces with Isis terrorists, who established a foothold in the country in 2015, to carry out an attack in the northern Sar-e Pul province, killing dozens of civilians earlier in August.

The Taliban denied the claims, saying it had acted alone.