Don’t miss Hugh White in this morning’s Fairfax papers on the Australian withdrawal from Afghanistan. His conclusion is unambiguous: “Australia’s military operation in Afghanistan has failed. It is important to face this uncomfortable fact and learn from it what we can.”

White’s argument is that instead of leaving Afghanistan with a stable, functional government that would keep out the Taliban and al-Qaeda, “we leave Afghanistan with a deeply corrupt and incompetent government exercising little authority over most of the country and people it is supposed to govern, and no serious prospect that a better government will emerge.”

He is particularly savage on the fashionable notion of counterinsurgency:

The formula has been tried in many places since the Western empires collapsed, and it has always failed, just as it has failed again now. Even 200,000 Western troops were far too few to make it work in Afghanistan, and even three times that number could do nothing to make the government in Kabul look good to the Afghan people.

Yet again, [counterinsurgency] has stumbled on the inherent contradiction that lies at its heart. Any government that is too weak to win a counterinsurgency without massive outside help is too weak to be worth supporting.

I think this is absolutely right. But White leaves out a major part of the Afghanistan story, namely the invasion of Iraq.

It’s commonly accepted wisdom now that the Americans “took their eye off the ball” in Afghanistan by being diverted to Iraq. From the point of view of George Bush and Dick Cheney, the diversion made sense: Afghanistan was a mountainous backwater, whereas Iraq was potentially a very wealthy country at the crossroads of civilisation. If you wanted to make a statement as an imperial power (and they did), Iraq was the place to make it.

By the time attention returned to Afghanistan, it was much too late – the government of Hamid Karzai had thoroughly discredited itself and the Taliban had had the opportunity to rebuild support.

But it wasn’t just the lack of attention. The Iraq war poisoned the well of support for western intervention generally. Having started with massive international sympathy and support following the 11 September attacks, the United States threw it away by behaving like an international outlaw. For the project of winning hearts and minds in Afghanistan (or pretty much anywhere else), that was fatal.

And that problem bears on White’s subsidiary point, that “the real reason the government sent our forces to Afghanistan and have kept them there” was to support the Americans. Loyal support for the US alliance has been the cornerstone of Australian foreign policy for more than 60 years, but Iraq exposed the flaw in it. As I wrote a few years ago, “it had been based on a premise that American policy would not exceed the bounds of sanity, and that turned out to be mistaken.”

It also raises the question of whether our presence in Afghanistan in recent years has not just been a failure but has actually been making matters worse. Without western military assistance, perhaps Karzai’s government would have been forced to behave better and to reach some sort of accommodation with its rivals. We don’t know, but we may yet find out.

That’s the one ray of hope in the otherwise bleak Afghan prospect: that the Afghans might eventually be able to do for themselves what our bombs and tanks were so manifestly unable to do for them.