Already our troops have created a backlash with Kabul University students this week burning President Obama in effigy until police dispersed them with gunshots. The heavier our military footprint, the more resentment  and perhaps the more legitimacy for the Taliban.

Schools are not a quick fix or silver bullet any more than troops are. But we have abundant evidence that they can, over time, transform countries, and in the area near Afghanistan there’s a nice natural experiment in the comparative power of educational versus military tools.

Since 9/11, the United States has spent $15 billion in Pakistan, mostly on military support, and today Pakistan is more unstable than ever. In contrast, Bangladesh, which until 1971 was a part of Pakistan, has focused on education in a way that Pakistan never did. Bangladesh now has more girls in high school than boys. (In contrast, only 3 percent of Pakistani women in the tribal areas are literate.)

Those educated Bangladeshi women joined the labor force, laying the foundation for a garment industry and working in civil society groups like BRAC and Grameen Bank. That led to a virtuous spiral of development, jobs, lower birth rates, education and stability. That’s one reason Al Qaeda is holed up in Pakistan, not in Bangladesh, and it’s a reminder that education can transform societies.

When I travel in Pakistan, I see evidence that one group  Islamic extremists  believes in the transformative power of education. They pay for madrassas that provide free schooling and often free meals for students. They then offer scholarships for the best pupils to study abroad in Wahhabi madrassas before returning to become leaders of their communities. What I don’t see on my trips is similar numbers of American-backed schools. It breaks my heart that we don’t invest in schools as much as medieval, misogynist extremists.

For roughly the same cost as stationing 40,000 troops in Afghanistan for one year, we could educate the great majority of the 75 million children worldwide who, according to Unicef, are not getting even a primary education. We won’t turn them into graduate students, but we can help them achieve literacy. Such a vast global education campaign would reduce poverty, cut birth rates, improve America’s image in the world, promote stability and chip away at extremism.

Education isn’t a panacea, and no policy in Afghanistan is a sure bet. But all in all, the evidence suggests that education can help foster a virtuous cycle that promotes stability and moderation. So instead of sending 40,000 troops more to Afghanistan, how about opening 40,000 schools?