In wars, and especially in counterinsurgency wars such as the American war in Afghanistan, it’s often said that killing civilians creates insurgents. Gen. Stanley McChrystal, who commanded US forces in the Afghan War, often referred to this as “insurgent math.” If it’s true, then the United States has created tens of thousands of insurgents since 2001, according to back-of-the-envelope calculations by the military itself and by the National Bureau of Economic Research (NBER), which studied the issue in 2010.

“Because of CivCas [civilian casualties], I think we have just about eroded our credibility here in Afghanistan,” said McChrystal in 2010, according to the Marine Corps Times. Command Sgt. Maj. Michael Hall, then an aide to McChrystal, estimated roughly that every civilian killed creates an additional twenty insurgents. Hall noted that before the US military “went very, very kinetic” — i.e., before it intensified its violence — there were 1,500 to 2,000 insurgents; four years later, there were 30,000 to 35,000. As the Marine Corps Times reported, “Breaking the numbers down further, Hall said that when ISAF [the International Security Assistance Force] inflicts civilian casualties, the result is a 25 percent to 65 percent increase in violence in that area during the next five months.”

In July 2010, the NBER prepared a study designed to find out exactly how this works. Called “The Effect of Civilian Casualties in Afghanistan and Iraq,” it was assembled by researchers from Princeton, Stanford and the London School of Economics, and it was facilitated by Col. Joseph Felter. While serving in Afghanistan, Felter worked closely with McChrystal and his successor, Gen. David Petraeus, in developing counterinsurgency strategy, and he spent time with troops to find out how ISAF’s efforts to reduce civilian casualties were being received. “I was also out in the field trying to educate commanders in the field on [the ISAF commander’s] intent regarding CIVCAS,” Felter told The Nation.

Thanks to then–Maj. Gen. Michael Flynn, McChrystal’s intelligence chief and special operations officer, who is now director of the Defense Intelligence Agency, Felter and the NBER research group were able to gain access to a highly classified military database, called the Combined Information Data Network Exchange, and a related database called JOISS, a joint operations incident reporting system. Neither CIDNE nor JOISS is complete, since many incidents involving civilian casualties aren’t passed up the chain of command or don’t get reported to the military at all. But, say members of the NBER team, there existed enough data in CIDNE to draw important conclusions about how killing civilians leads to intensified violence. The CIDNE database allowed the team to track “micro-level, geocoded data” on violent incidents involving both US-caused civilian casualties and insurgent attacks, down to the level of province, district and village, on a day-to-day timetable. Not surprisingly, none of these data are publicly available.

The NBER report concluded that for each incident involving civilian casualties caused by ISAF, there would be at least one additional violent clash between insurgents and ISAF in that same district over the next six weeks. It also found a “robust relationship between civilian casualties and long-run trends in IED [improvised explosive device] incidents.” It concluded: “The data are consistent with the claim that civilian casualties are affecting future violence through increased recruitment into insurgent groups after a civilian casualty incident. Local exposure to violence from ISAF appears to be the primary driver of this effect.” The data analyzed by the team involved 2,118 incidents that resulted in 4,077 civilians killed between January 2009 and March 2010.

The NBER report says that for each civilian killed by ISAF troops, there would be an “additional 0.03 attacks per 1,000 people in the next 6-week period,” and that “an additional civilian casualty accounts for 0.03 to 0.08 more IED attacks per 1,000 in the population.”

Radha Iyengar, a researcher from the London School of Economics who was working at RAND when The Nation interviewed her, was one of the lead authors of the NBER study. Surprisingly, she says, greater violence against coalition forces followed civilian casualty incidents whether the deaths were caused by ISAF or by the Taliban. “It doesn’t matter if the coalition is responsible for the killing,” she said. “From what we heard from company commanders, the villagers say, ‘If you weren’t here, the Taliban wouldn’t be blowing things up.'” So either way, Afghan villagers blame foreign forces, and such sentiments bolster the insurgents.

Most of the effects of civilian casualty incidents are localized, Iyengar said: “It’s not as if an incident happens in a Pashtun village and then all of the Pashtun belt goes wild.” Afghanistan’s thirty-four provinces are divided into as many as 398 districts. In the study, Felter, Iyengar and their colleagues compared the violence with neighboring districts where no civilian deaths occurred, in order to estimate the effects of civilian casualties.

Jacob Shapiro of Princeton, another member of the NBER research team, says that according to their data, the anger, alienation and pro-Taliban sentiment caused by a civilian casualty incident are long-lasting. “The effect takes about fourteen weeks to fade,” he says.

Perhaps the clearest and most succinct explanation of why the war in Afghanistan was failing came inadvertently from General McChrystal himself, in an October 1, 2009, address to the International Institute of Strategic Studies. Although he was speaking about killing insurgents, not civilians, the US military has often made little distinction — and, in either case, the principle of insurgent math applies.

“There is another complexity that people do not understand,” McChrystal said, “and which the military have to learn: I call it ‘COIN mathematics.’ Intelligence will normally tell us how many insurgents are operating in an area. Let us say that there are 10 in a certain area. Following a military operation, two are killed. How many insurgents are left? Traditional mathematics would say that eight would be left, but there may only be two, because six of the living eight may have said, ‘This business of insurgency is becoming dangerous, so I am going to do something else.'”

But, McChrystal added, “there are more likely to be as many as 20, because each one you killed has a brother, father, son and friends, who do not necessarily think that they were killed because they were doing something wrong. It does not matter — you killed them. Suddenly, then, there may be 20, making the calculus of military operations very different.”

Click here to view the interactive database of America’s Afghan Victims.

This article was reported in partnership with The Investigative Fund at The Nation Institute, now known as Type Investigations.