The main thing making Islamic terrorism such a powerful and persistent problem in Afghanistan is the presence of the drug trade. Producing and exporting heroin creates demand for men with guns who can protect the plants (poppies) needed to produce opium and escort the precious heroin out of the country to markets in America, Europe, and the Middle East. Without that financial link with drug gangs, the Taliban and other Islamic radical groups in Afghanistan would remain the minor nuisances they have been for centuries.
While heroin and opium are the big drugs in Afghanistan (generating over $4 billion a year) there is also a growing trade in cannabis (marijuana). While heroin is relatively new to Afghanistan, cannabis has been around for thousands of years. Historical accounts from the West, China, Middle East, and India all mention the Central Asian tribes as being avid users of cannabis as a narcotic. This is probably why Afghan cannabis is among the most potent “traditional” strain of the plant. With all that, there is much less commercial production of cannabis (about $65 million worth a year) than of opium and heroin. In large part that’s because cannabis is more bulky and shipping anything out of landlocked Afghanistan is a major task (especially if you have to smuggle it out). Hashish (the concentrated form of cannabis) is a lot more compact but still not as lucrative as heroin. Thus, most of the commercial cannabis crops in Afghanistan are for local consumption or export to neighboring countries. In addition to the commercial cannabis crops, it’s traditional in much of Afghanistan to grow some cannabis in the family garden, along with other herbs and medicinal plants.
Opium has been around for centuries, but only the wealthy could really afford it. For the average subsistence farmer, growing a lot of poppies (and then going through the labor intensive process of collecting the opium paste from the plants) did not make much economic sense. Cannabis was easy to grow and harvest. The entire plant was useful and it was considered a multipurpose crop worth cultivating for family use.
It was wealthy markets that made opium and (by the 19th century) heroin and morphine (both derived from opium) big sellers to the growing number of people who could afford it. This first occurred in the 18th century when the booming Chinese economy made opium cultivated across the border in northern Burma an attractive import. The Chinese government soon banned opium, but the wealthy were still willing to buy. The industrial revolution really got going in the 19th century, producing a lot more wealth and demand for expensive entertainments, like recreational drugs. The subsequent increase in crime and terrorism was largely ignored by those getting rich and high off this new phenomena.