A thoughtful former infantry officer, David Kilcullen is respected in military circles: He knows his way around a battlefield, and wrote his Ph.D. thesis on insurgency in Indonesia. This is, in short, a man the Obama administration would be well advised to appoint to a national-security post.

In The Accidental Guerrilla, he adopts an academic tone in addressing both practical military matters and abstract geopolitical theories — two subjects it’s very difficult to combine in one book. He begins by advancing four “models” that explain the causes of modern-day insurgencies. He then synthesizes them into what he calls the “Accidental Guerrilla Syndrome”: Islamic extremists move into an ungoverned or conflict-laden area where they dominate by combining violence with persuasion. When host-nation or U.S. forces counterattack with excessive force, the locals respond by fighting alongside the terrorists. Thus “our too-willing and heavy-handed interventions” create accidental guerrillas.

“They fight us,” he argues, “not because they seek our destruction, but because they are encouraged by a cynical, manipulative clique of takfiri terrorists which, though tiny in number, has been catapulted to great political influence and prestige because of our reaction to 9/11.” Our ill-advised military actions, he concludes, “have turned a mouse into an elephant.”

Turning to Iraq, Kilcullen explains that he was appointed in early 2007 by the State Department as senior counterinsurgency adviser to Gen. David Petraeus. Kilcullen candidly admits that the 2007 U.S./Coalition Campaign Plan, to which he contributed, envisioned imposing sufficient security to allow Iraq’s leaders to reach a “grand bargain” at the top. Instead, the tribes aligned with American and Iraqi security forces at the bottom level, while the top remained divided.

He cites the tribal revolt as “the most significant change in the Iraqi operating environment.” The Sunnis were the accidental guerrillas. Once they came over to the American side, the terrorists were exposed. Kilcullen points to mid-2007 as the key date in the Sunni revolt; in fact, the Sunni “Awakening” occurred in the fall of 2006 in Anbar province, scene of the war’s fiercest fighting and controlled by the Marine Expeditionary Force. In 2006, out on the western front (Anbar), the troops were patrolling from small outposts among the population; in Baghdad, the troops had pulled back to large Forward Operating Bases, or FOBs.

“I frequently went out [in Baghdad in 2007] with battalions, companies, or adviser teams,” Kilcullen writes, “who needed a little ‘on-field coaching’ to understand the new approach.” It is false, though, to imply that the “new approach” of population-protection tactics began in 2007. Those tactics — which facilitated the Sunni rebellion — had succeeded in Anbar before the surge in Baghdad began. The brilliance of General Petraeus and Lt. Gen. Raymond Odierno, his corps commander, lay in taking the Anbar model and applying it elsewhere, welcoming Sunnis onto the coalition side. Thus Petraeus and Odierno not only saved Baghdad; they also concluded the war, by aligning Sunni neighborhood-watch groups with Iraqi army and police units across Iraq.

The subtitle of the book is “Fighting Small Wars in the Midst of a Big One,” and appropriately so: Kilcullen’s focus is on the political context and the historical setting, rather than the fighting itself. Also, he discusses the smaller (than Iraq) conflict in Afghanistan: There and in western Pakistan, Kilcullen explains, the tough, acephalous Pashtun tribes are the accidental guerrillas who have aligned with the Taliban. “If we can brush the enemy out of the way,” he writes, “marginalize them politically, root out insurgent infrastructure, and make local communities self-defending, we can inoculate the population against the Taliban.” Unfortunately, he does not explain why we Americans, and the Afghan government, have been unable for eight years to contain the Taliban. If we haven’t analyzed why we have failed, it’s hard to see how we can succeed.

Kilcullen observes that foreign troops must forge “partnerships and trusted networks with at-risk communities” at the ground level. “Our job is to support where needed,” he writes, “and to realize this will play out in ways that . . . are fundamentally unpredictable.” He demonstrates his military expertise by acknowledging that unpredictability; no one, after all, predicted the Sunni tribal revolt. Sheik Abu Risha led that rebellion; shortly before he was killed by al-Qaeda in 2007, I asked him why the Sunnis had not come over earlier, sparing us and them much bloodshed. “You Americans couldn’t convince us,” he replied. “We Sunnis had to convince ourselves.”

How such tribal conviction metastasizes into violent action against Islamic extremists is a mystery; and how to reach that point in Afghanistan is in basic dispute. On one hand, the U.S. Marines have concluded from Iraq that they can organize the indigenous security forces and the tribes, and then pull out. They reject nation building as a military mission. On the other hand, the leadership in the Pentagon seems to side with Kilcullen, who argues that in Afghanistan we must first build a nation “with the host government genuinely and effectively in the lead,” then fight the insurgency, and, last, deal with the opium trade. Whether nation building is ancillary or central to the counterinsurgency campaign makes a huge difference in the size and deployment of resources, military and civilian.

Although his chapters are a bit discursive, the author argues strongly for a grand strategy over the next several decades — one with a less military emphasis, so that we do not create “the accidental guerrilla.” He concludes by advocating that 80 percent of our future counterinsurgency effort be devoted to political dialogue, economic development, and strategic information efforts to offset radical Islamic propaganda.

Kilcullen is especially effective in limning the ferocity of the Afghan guerrillas, accidental and otherwise. His scholarship, both erudite and courageous, reminds the reader of Robert Kaplan. He does not, however, prescribe how Americans can transform a corrupt host government and thrust it into the lead in defeating those guerrillas. While he advocates tribal engagements, he questions whether “we could succeed in subduing a people who had fought tooth and nail to retain their independence from all invaders in recorded history, and in creating a governed space, in the FATA [the Federally Administered Tribal Areas in western Pakistan].”

He thus appears to be scrupulously fair, by taking both sides on the issue at stake: We foreigners can implement a strategy that defeats the Taliban, and we cannot. We can nation-build, and we cannot.

We are all, then, left waiting for that unpredictable, incandescent moment when Afghan security forces or tribal clans drive out the Taliban. And none of us knows whether or how that will happen.