The recent “unpleasantness” in Afghanistan — the killing spree by a U.S. soldier, the burning of Qurans, and desecration of Taliban corpses — has made the quagmire there even more unpopular with the American public, thus causing even superhawks, such Rick Santorum and Newt Gingrich, to question the American military’s mission there.

Santorum, formerly one of the most hard-line Republicans on Afghanistan, is actually now backhandedly advocating leaving Afghanistan sooner than the “dovish” President Obama would. According to Santorum, “We have to either make the decision to make a full commitment, which this president has not done, or we have to decide to get out, and probably get out sooner.”

Gingrich appears to be orchestrating the same flip-flop. “We need to understand that our being in the middle of countries like Afghanistan is probably counterproductive. We’re not prepared to be ruthless enough to force them to change. And yet we are clearly an alien presence.” He added later that he feared the mission was one “that we’re going to discover is not doable.”

You know the curtain is rapidly falling in Afghanistan when the jingoes begin to sing the same tune as those of us who have been saying these things for more than a decade, even giving warnings of them prior to the invasion of that country.

In December 1998, I wrote a piece warning that continued U.S. meddling overseas could bring catastrophic retaliation by terrorists. After it did on 9/11, I and a only a few others warned that countering terrorists had to be done with a light footprint or the problem could be made worse. But instead of using a light footprint — law enforcement, Special Forces, and drones — which finally crippled al-Qaeda, the United States used the invasion and occupation of not one country (Afghanistan), but a second unrelated nation (Iraq). Predictably, the Iraq War caused a spike in global terrorism. The U.S. then attacked several other Muslim countries — Yemen, Somalia, and Libya.

U.S. policymakers and politicians were slow to grasp the simple principle that non-Muslim occupation of Muslim lands drives Islamist militants wild and creates more of them to fight, despite many past examples of this phenomenon occurring — in Soviet-occupied Afghanistan, Israeli-occupied Palestine, Russian-occupied Chechnya, and Indian-occupied Kashmir. The rise of al-Qaeda in Iraq during the U.S. occupation and the resurgence of the Taliban in Afghanistan are only the latest — and very predictable — episodes.

A corollary to this principle also has been lost on the Bush-, Obama-, Santorum-, and Gingrich-style Wilsonians: the U.S. doesn’t need to remodel countries in the American image at gunpoint to counter terrorism. In fact, doing so incubates more instability and terrorism. For example, the U.S. nation-building war in Afghanistan destabilized Pakistan and created the Pakistani Taliban, which has subsequently tried to attack the U.S. homeland.

However, although Gingrich is beginning to get it, he still doesn’t understand that brute force rarely causes people to change into democrats, especially when they know the foreign occupier will eventually leave. Even counterinsurgency experts, who often overstate the possibility of being successful in such nation-building endeavors, emphasize that competing with guerrillas for the population’s “hearts and minds” is the most important element needed to “win.” Using brute force on the locals is one way to lose that competition quickly.

Even a shooting spree by one soldier or incidents like burning Qurans or desecrating guerrilla corpses can prove catastrophic in turning the indigenous population toward the insurgents. Many Americans, including major news outlets, can’t seem to understand, even in the face of these incidents, why Afghans don’t appreciate that American troops are giving their lives to defend that country. That’s because in counterinsurgency warfare, the foreign occupier is rarely given the benefit of the doubt; the Taliban may be brutal, but they have a tremendous advantage in being Afghans.

The latest shooting spree in Afghanistan may have even larger repercussions, because it may torch any agreement for long-term U.S. military presence after most troops withdraw in 2014. In Iraq, the shooting of innocent Iraqi civilians by U.S.-employed Blackwater mercenaries and other atrocities by U.S. forces during the war compelled the Iraqi government, under popular pressure, to demand that U.S. military forces be subject to Iraqi laws and justice. But the American empire does not entertain such constraints for its forces; thus, U.S. forces had to reluctantly withdraw completely. After the latest shooting spree, the Afghan government, in a similar nod to domestic public outrage, may make a similarly unacceptable demand, thereby nixing any long-term U.S. military presence.

The silver lining in the very dark cloud of the shooting incident is that the American people and even normally hawkish politicians may compel the Obama administration to withdraw faster from Afghanistan. Thus, the long-overdue end to this senseless quagmire at last may be in sight. Both Afghan and American lives will be saved. But the question remains: Why do governments seem to reach clarity only through being jarred by failure rather than by paying attention to commonsense caution up front?