Reading the literature on the insurgencies and counterinsurgencies of the 1950s and 1960s, one thing that stands out is that - as you'd expect from practitioners of what the Chinese used to call bandit extermination - there is very little agency attributed to the people. Yes, it is necessary to - here we go with the cliches - win their hearts and minds, but they aren't credited with very much of the latter.
David Kilcullen's The Accidental Guerrilla could easily have slid into this; even the title would suggest it. But the titular guerrillas are only accidental in that their role as guerrillas fighting in a global struggle is accidental; this is, Kilcullen argues, a role that has been imposed on them by the forces of order and also by the forces of Al-Qa'ida International and its local franchises, in a sort of unconscious conspiracy to recruit them into the war both sides want to fight.
Instead, their aims are local and rational. They want above all to survive, to pursue their interests, and to be left alone to maintain their primary identities. So far, this sounds a lot like the mythic peasant who sides with the strongest party; but Kilcullen's "survival-oriented civilians" (which really ought to be the name of a band) are far more active, activist, and intelligent than that.
The problem in understanding this is that politics is frequently the study of hierarchy; but in reality, humans operate in multiple social networks at once, using their role in one system to influence another. You might offer mates' rates in business to get support in politics, or call in favours from your extended family to pack a committee. I recall that a Labour Party chairman of my acquaintance took delivery of a huge donation of wine coolers in order to further his campaign to get onto another regional committee; he was already on several at different levels.
Their aims in this are more than the crude Hobbesian ideas we tend to project on them. It's not enough to side with Leviathan; survival requires certainty. It is intolerable to live in an environment where there are no rules that you can follow to avoid being killed. The response of the intelligent human being is to either find someone who does have such a set of rules and join them, or else to sign up enough people with suitable connections to establish your own. Arguably, Kilcullen's view of insurgency and counter-insurgency is something like two processes of state formation operating in close proximity.
Kilcullen cites the work of several anthropologists who argue that this phenomenon of "interhierarchical roles" is especially important in societies where traditional forms of government or of self-government are changing; it is exactly these debatable lands where the wars he described have been fought out. In these zones, the arrival of the global guerrillas just means the creation of another option in the routine business of business, politics, and religion.
They settle; they start businesses, they get elected, they marry. And then the government or the Americans or some similarly alien force comes after them; at which point people who were cooperating with them to get on find themselves recruited into a global war on terror, as the intervention becomes an attack on the whole society. This cycle of provocation, intervention, and reaction spins faster and faster, separating out the elements of society into false "pro-western" and "jihadi" factions while corpses pile up.