The United Kingdom, the Soviet Union, the United States. Three Great Powers. Four invasions of Afghanistan. The first three ended badly for the invaders -- and for the Afghans. Now, both U.S. presidential candidates tell us we need more resources for Afghanistan, where our military leaders assert we aren't losing -- but concede we're not winning, either. Before following either candidate, perhaps we should compare wars and consider the current realities. Why do we think the fourth time's the charm?

Great Britain, flexing its imperial muscle, invaded Afghanistan in 1839. It easily took Kabul and settled in to colonial rule. But by 1842, its forces were stumbling through rugged passes in retreat. Only one British officer, physician William Brydon, made it out alive.

In 1878 the British went in again, and again won quickly. But by 1880, they saw that defeating Afghanistan did not equal controlling it. A repeat of 1842 looked all too possible. London withdrew its forces before worse could happen. The "victory" cost more British than Afghan fatalities and more than three times the original war budget.

A century later, in 1979, Soviet forces moved in. As with the British, the first years were calm -- while the Afghans took the measure of the invaders and regrouped. We all know what happened: The Red Army withdrew in 1989, in what most observers consider a key cause of the demise of the Soviet Union.

The pattern seems clear. Our invasion, too, was quick, with thankfully few casualties. The country was a mess, but calm enough that we could support elections and take pride in them. Today, no one would call the country calm, and the U.S. and coalition casualty rates exceed those in Iraq. As the British and the Soviets learned, defeating Afghanistan does not equal controlling it.

Why? First, the Afghans simply hate outsiders on their land. Hospitable in the extreme to travelers, they adamantly oppose invaders of any sort or reason. A recent Toronto Globe and Mail survey of Taliban fighters showed that they fight not for the Taliban nor for jihadist Islam, but against Western troops in their country. If we are there, they will fight. As one Afghan expert put it, "This raises the question of whether Afghanistan is not becoming a sort of surreal hunting estate, in which the U.S. and NATO breed the very 'terrorists' they then track down."

But crucially, we are failing the first task of a true "counterinsurgency" campaign, the strategy we claim to be pursuing. That task is winning hearts and minds on the ground. We can't do that when high-tech warfare -- drones, rockets, airstrikes -- kills innocent civilians far too often. Yes, just as in Iraq, the "bad guys" do mix with civilians, and that's wrong. But David Kilcullen, formerly Gen. David Petraeus's adviser on counterinsurgency, stressed to me in Iraq last year that the worst statistic for a counterinsurgency strategy is civilian casualties. It doesn't matter why -- when they happen, the obligation to blood revenge overwhelms the positive accomplishments of our troops.

We really have only one interest in Afghanistan -- that it not be used as a platform for attacks against us. We shorthand that as capturing Osama bin Laden, but we really need only that he can't operate beyond the Afghan-Pakistan border region. If our very presence actually feeds sympathy for him and undermines the governments of both Afghanistan and Pakistan -- what are we accomplishing?

Does Afghanistan need vast amounts of aid, military and civil? To be sure. But all observers consider that a task of decades, if not generations. Are we prepared for that? Unlikely. And if we're not, then, again, just what are we accomplishing, as we spend money and lives while stimulating opposition, not reducing it? Rather than fighting the Fourth Afghan War, and further alienating both Kabul and our ally in Islamabad, perhaps we need to accept that Afghanistan -- and Pakistan -- will not be governed as we would like. They just need to prevent their territory from being used against us. That would be a position that Pakistan could support, and that offers some hope of a joint approach to progress in Afghanistan.

William Davnie, a retired Foreign Service officer with experience in Afghanistan and the surrounding region, lives in Minneapolis.