A few years ago, while I was embedded with U.S. troops in southern Afghanistan, my humvee convoy stopped in a small village. It was just the moment that the gunner on my vehicle had been waiting for. His grandmother back home in Kentucky had sent him a package of hard candies "for the Afghan children," and he carried them on patrol. As the curious village children crept closer to the parked humvees, he started tossing out the treats. The children were delighted and responded by running closer, cheering, waving and flashing thumbs-up signs. It was a charming moment. The children were happy to see the soldiers, and the soldiers were thrilled to be appreciated by locals. The elevated mood lasted all the way back to camp, until the evening debriefing. The furious commanding officer berated the soldiers, saying that distributing candy could cause children in the future to run out in front of moving humvees, risking an accident. Worse, the enemy could take advantage of the crowd to get close to the vehicles and detonate a bomb, endangering the soldiers and the children. "We are not here to make ourselves feel good," said the officer. "We are here because we have a job to do."

Three years ago, the commander's sentiment seemed overly bleak. For
soldiers hunkered down on an isolated base that regularly took fire, giving candy to children seemed like a pretty innocent way to lift spirits. These days, however, his warning seems prescient. Just last week, soldiers inspecting a project outside of Jalalabad stopped to toss candies to kids who were swarming around their humvees. Minutes later, an explosion tore through the crowd, killing five Afghans, including two boys, and wounding nine U.S. soldiers. The crowd quickly turned on the Americans, blaming them for the deaths.
(See pictures of the war in Afghanistan.)

One of the ways to avoid such unintended consequences, as that commander at Forward Operating Base Maizan in Zabul province noted, is to remember why foreign troops and internationals are in Afghanistan. "Winning hearts and minds," that catchphrase of counterinsurgency, can be easily misunderstood. The aim of Western soldiers in Afghanistan is not to win affection for themselves or their armies but to build support for the Afghan government.

The same goes for international donor agencies. Afghans may appreciate paved roads or new hospitals "donated by the American people," as the project signs so proudly proclaim, but getting them to like Americans is not going to win the war. Success will only come when Afghans are willing to pay taxes to a government that is able to provide those services itself. Otherwise, the foreign endeavor in Afghanistan is destined to fail  when the donor spigot is turned off, local goodwill is bound to fade. Or worse, as in the case near Jalalabad, magnanimous gestures can all too easily be turned into an opportunity for grievance.

Rumors that U.S. soldiers had desecrated the Koran sparked a violent protest in the southern province of Helmand last week. Rioters turned their fury on the local offices of the National Directorate of Security (NDS), whose intelligence officers then fired on the crowd, killing eight. The Americans were blamed  just a few hours after the event, many residents claimed to have seen U.S. soldiers alongside the NDS officers who fired on the crowd. The U.S. military says none of its personnel were present at the scene. Most likely, the local Taliban shadow governor promulgated the rumors of a desecrated Koran. Still, that incident as well as the Jalalabad one underscore the U.S.'s failure to understand the local environment, much of it attributable to a self-centered approach to gathering and disseminating intelligence throughout the Afghan theater. A new report titled "Fixing Intel: A Blueprint for Making Intelligence Relevant in Afghanistan," written by the top U.S. military intelligence commander there, slams intelligence failures (even before a Jordanian double agent detonated his suicide vest inside a CIA facility, killing eight personnel). The report says that intelligence-gathering systems are "ignorant of local economics and landowners, hazy about who the power brokers are and how they might be influenced, incurious about the correlations between various development projects and the levels of co-operation among villagers, and disengaged from the people in the best position to find answers."
(See pictures of life in the Afghan National Army.)

The writers follow their incisive criticisms with far-reaching prescriptions. "Understandably galled by IED strikes that are killing soldiers," write Army Major General Michael Flynn, Marine Captain Matt Pottinger and Paul Batchelor of the Defense Intelligence Agency, "these intelligence shops react by devoting most of their resources to finding the people who emplace such devices ... These are fundamentally worthy objectives, but relying on them exclusively baits intelligence shops into reacting to enemy tactics at the expense of finding ways to strike at the very heart of the insurgency ... and, as a result, expose more troops to danger over the long run." In other words, it's not about protecting us or avenging our losses; it's about understanding Afghans and enabling their security forces to take over as soon as possible. And that's a more difficult job.

It may often appear easier to pave a road than to work with often fractious local officials to figure out the provision of services for their communities. And militarily speaking, it is a lot easier to tackle the guy who is planting IEDs than the one who is spreading false rumors. Yet in the long run, it is the more difficult tasks that will bear the most results. Flynn, Pottinger and Batchelor compare the war to a political campaign, albeit a violent one: "If an election campaign spent all of its effort attacking the opposition and none figuring out which districts were undecided, which were most worthy of competing for, and what specific messages were necessary to sway them, the campaign would be destined to fail ... pollsters and strategists [the equivalent of military intelligence staff] must constantly explore the local levels, including voters' grievances, leanings, loyalties, and activities. Experienced campaign strategists understand that losing even one or two key districts can mean overall defeat." After all, as the old axiom has it, war is the continuation of politics by other means.