From Afghanistan: A Cultural and Political History, by Thomas Barfield (Princeton U. Press, 2010), Kindle pp. 122-124):
Until 1840 religion had played a minor role in internal Afghan politics because fighting had always been Muslim on Muslim. Raising the banner of jihad had been a popular way to mobilize Afghans outward for invasions directed at the polytheists on the Indian plain or their Muslim rulers. But the British occupation of Afghanistan in support of Shuja raised the question of whether his regime had lost the authority normally inherent to a Muslim ruler. If Shuja’s government was just a cloak for the rule of foreign infidels, then rebellion against it would be justified. The charge that the government had betrayed Afghanistan’s Muslims and deserved to be toppled was therefore a constant theme in the propaganda directed against the British and Shuja. It had surprisingly little resonance when the British first invaded. It gained traction as the occupation continued, particularly as the British began to direct more of the government’s workings themselves. Putting Afghan opposition in a religious framework also made it more difficult for the British to mobilize previously willing allies among the Ghilzai chiefs. These chiefs declared that it would be politically fatal to take a public stance against a popular jihad opposing foreign occupation when it was so strongly supported by their followers. Of course, as ibn Khaldun had observed, religion had always been the best way to unite tribes that were otherwise too divided to unite on any other basis. It also ennobled more self-interested political, economic, and personal motives. Shuja himself complained that “these men are not influenced by considerations of religion, they give their lives for the wealth of this world and do not fear death.” That may have been true, but leaping to a “defense of Islam” to justify resisting a regime in Kabul or its policies would henceforth become a sword that was rarely sheathed in Afghan politics, regardless of whether foreigners were actually present on Afghan soil.
The rebellions against the British did not originate within Afghanistan’s Durrani elite. Although those who had experienced a loss of power may have incited others to violence, they took on leadership roles only well after the fighting had started. Instead, the first rebellions were mounted by more marginal groups that had their own grievances. The most important of these were the Pashtun Ghilzai tribes to the east and south of Kabul, and the Tajik Kohistanis of the plains and mountains north of Kabul. Chiefs and clergy from these regions who mobilized their own fighters were at the center of the resistance, not the existing forces of the irregular cavalry that were commanded by the Durranis. The trouble was also localized. The Durranis in Qandahar did not rise at all until two months after Kabul had fallen and then failed to take the city. Nor were there uprisings among the Hazaras, the Uzbeks, or in distant Herat. But in spite of their crucial contributions to the success of the war, neither the Kohistanis nor the Ghilzais took the opportunity to put themselves into power. They instead sought out military and political leadership from the existing (and politically vacillating) Barakzai and Sadozai elite. For example, the Kohistanis initially raised troops in the name of Shuja until he denounced them for using his name and forged seals to justify their rebellion. When it became clear that Shuja was sticking with the British, the Ghilzais and Kohistanis then rallied around Akbar when he took command of the forces besieging their cantonment in Kabul. Although it was he who took the lead in dealing with the British politically, Akbar’s power then and in the months that followed depended more on his Ghilzai allies than his Barakzai kinsmen.