The incident on Saturday in which NATO airstrikes killed two dozen Pakistani soldiers at border outposts was an accident waiting to happen. In fact, similar accidents had already happened along the Afghan-Pakistani border, although with smaller death tolls. This most recent incident also has greater impact because it occurs at a moment when U.S.-Pakistani relations were already very bad and the Pakistani response will be more severe, including kicking the United States out of an airbase used to recover and service drones, cutting off NATO's supply lines for what will probably be a longer period than with previous interruptions and a possible Pakistani boycott of an international conference intended to address Afghanistan's future.

Regardless of what post-mortem inquiries uncover about the specific events on the ground that preceded the incident, the event had two fundamental causes. One is the convoluted and almost self-contradictory nature of what the war in Afghanistan has become, with lines of contention that defy logic. Militants based in Pakistan foray across the border to conduct operations in Afghanistan, while other militants—of similar ilk but organizationally separate—use the cover of chaos in Afghanistan as a base for operations in Pakistan. The rationale of a U.S.-led counterinsurgency in Afghanistan is to combat a terrorist group that has hardly anyone in Afghanistan. In the face of that last fact, the rationale sometimes instead becomes the security and stability of Pakistan, even though operations conducted as part of the counterinsurgency have if anything made things more difficult for Pakistani security forces. And the same Pakistani regime on behalf of whose stability the counterinsurgency is supposedly being waged maintains cooperative relationships with some of the very insurgents against whom the war is fought. With lines of contention like that, it is little wonder that confusion can bring about something like Saturday's lethal incident.

The second cause is that, even when the lines of contention are clearer, stuff happens in the fog of war—destructive, unintended stuff. The “friendly fire” incidents that have accounted for a proportion of casualties in each of America's recent wars are one indication of that. This is not a matter of ill-disciplined troops. It instead is a fact of life in war, one that applies even to the best led and most rigorously trained forces.

Two lessons follow. One is that there should be no straying from the exit path to get the United States out of the now-illogical war in Afghanistan. The other is that when contemplating any large-scale use of military force, the possibility of accidents like this—and whatever political or other cost to the United States flows from them—needs to be factored into the decision making. No such use of military force ever goes according to plan, and sometimes what is unplanned turns out to be most costly and consequential.