I was reading David Kilcullen's The Accidental Guerrilla, and I reached the section where he started describing the culture and attitude of the tribes in the Kunar region. The descriptions of the tribal culture struck a chord in me; it seemed like I'd read a very similar description somewhere else: in Frank Herbert's Dune. Of course, Dune is a work of fiction and Accidental Guerrilla is nonfiction, but there are still many similarities between the two books. In both works, you have an invading power seriously underestimating the toughness that a harsh and unforgiving landscape has worked into its inhabitants.
In both books you have a tribal population whose fighting prowess comes from three factors: a harsh environment, a lack of infrastructure, and a lust for action and adventure on the part of its inhabitants. In addition, the tribes of Afghanistan and Arrakis share very strict codes regarding honorable behavior, and finally, both locations are coveted for strategic reasons.
The harsh environment of Afghanistan has forced its inhabitants to be tough, self reliant, and very strict about the distinction between honorable and dishonorable actions. The toughness and self reliance are dictated by the nature of the environment. If one is physically or mentally weak, long term survival is at threat. The lack of infrastructure means that required aid may not arrive for days or weeks. These circumstances push individuals and tribes to be as efficient and self-reliant as possible so that they can make the most of the resources at their disposal.
The harsh environment has an additional effect: it pushes each tribe to have a very strict honor code. The scarcity of resources, especially water, ensures that individuals from different tribes will conflict with one another. Yet, it is in the interest of these tribes that these conflicts are resolved quickly and with a minimum of violence. The complex honor systems exhibited by both the Pashtun tribes of Afghanistan and the Fremen tribes of Arrakis are the result of the interplay between these opposing forces. On one hand, the honor code allows a tribesman to call upon aid quickly when he encounters an enemy. On the other, these honor codes have multiple occasions at which tribal elders may intervene in order to end the conflict. These two factors ensure the safety of each tribes' members while simultaneously ensuring that no conflict grows to the point where the survival of the tribe is threatened.
The uncompromising environment is also used by both cultures as a moral standard. Both Afghan and Fremen traditions use exile as a sort of ultimate punishment. The reasoning is, without the support structure of the tribe, the individual is inevitably doomed. If the exiled individual survives and makes it back to the tribe after his or her period of exile, he or she is somehow blessed by Nature, and is therefore deserving of reintegration into the group.
Though it is necessary, a harsh environment alone does not make for a fearsome fighting reputation. A certain cultural lust for adventure or fighting is also required. Both the Afghans and Fremen individuals actively challenge themselves and others in contests that involve considerable physical danger for little gain. In Dune, a rite of passage for all Fremen is to learn how to ride the sandworm. This is despite the fact that other technologies for transportation are available, and the sandworm mode of transportation itself has significant limitations. The cultural significance of riding a sandworm overrides the practical hindrances. Afghan tribes have similar cultural practices. Kilcullen describes Afghans engaging in a firefight against American soldiers even though they were not the original targets of either side. When later questioned on why they participated, most of the tribesmen gave answers alluding to seeking glory and fearing dishonor for not participating. Very few gave answers related to fearing for their safety or defending their homes. This suggests a similar mindset between the inhabitants of the two locales - both fight for the the thrill of battle, even when life and property may not be at stake.
The nature of the peoples is seen in the histories of the two lands. Neither has been conquered by outside powers for any extended period of time, despite their strategic advantages. Afghanistan has been subject to multiple invasions, starting with Alexander the Great, and ending with the recent intervention by the US military. Arrakis, while nominally under the control of the CHOAM conglomerate, is never subjugated outside of the the small area around the spaceport. The reason for this is that the combination of environment and culture of these lands makes them inherently hard to impose control on. The native inhabitants of these lands have a head start of millennia in adaptation over foreign conquerors. This gives them a nearly insurmountable advantage in resisting conquest. The integration of the terrain into the natives' folklore and oral tradition confers a nearly genetic affinity for the terrain, making it seem as if the natives were using the land itself as a weapon against the conquerors. Even when invading armies score military victories, the native forces are often able to withdraw, scattering and living off the land, while the invading troops are dependent on a long and tenuous supply chain in order to survive. This supply chain is a large vulnerability that allows the native to apply constant pressure against the invader.
In writing Dune, Frank Herbert accurately presaged the sort of fourth-generation warfare that American forces would engage in during the Afghan campaign to root out the Taliban. The fact that he was able to do so in an era where modern, conventional forces reigned supreme testifies to his vision, knowledge of history and literary skill.