The news that the British have built far more schools and hospitals in Helmand province than the government of Afghanistan can afford to run, exposes a lie about our intervention in that country that is in many ways as insidious as the lies that surrounded the invasion of Iraq.

Afghanistan was always different from Iraq, both in terms of legal authority and in the manner in which the intervention was carried out. Most significantly, Afghanistan was not "invaded" by the west. Or if an invasion took place, it happened in 2006 or else in 2009.

The US-led Operation Enduring Freedom, which ousted the Taliban 10 years ago, was carried out by a handful of special forces who flew into the country with suitcases full of cash. They bought the allegiance of selected warlords and then called in air strikes against the Taliban hold-outs. Crudely put, we backed one side against another in a brutal civil war that had been going on since the fall of the previous externally imposed government of President Najibullah.

An international conference in Bonn, Germany, legitimised the process in December 2001 and selected Hamid Karzai as president basically because he was the most prominent Pashtun that could be found who spoke good English. The UN mission sent to help oversee the process was deliberately given a "light footprint" with no executive authority and extremely few resources. A token international military force was also deployed consisting of 4,000 soldiers.

At the same time a larger number of humanitarian aid workers arrived to help with the postwar reconstruction. I was one of them and lived in the country for a year-and-a-half between 2003 and 2004 so had a ringside seat of the resulting debacle.

The Taliban regrouped in Pakistan and gradually stepped up their cross-border attacks. International aid workers were among the softest targets to attack, and I lost count of the number of friends and colleagues who were killed and injured during this time. Part of the reason we were attacked was a decision by western governments to tie the delivery of aid into a counter-insurgency strategy that was essentially developed to make up for the lack of troops (who were by then increasingly bogged down in the fighting in Iraq). Aid became increasingly viewed as instrumentalist, a means of buying hearts and minds, isolating the insurgents, or to "shape, hold, clear, and build" as the counter-insurgency terminology puts it.

That this strategy was not working was obvious to everyone on the ground, and convinced the British and Canadian governments to significantly ramp up their military deployments in Kandahar and Helmand in 2006. However, rather than publicly admitting that they were being sent in to fight counter-insurgency campaigns, these were dressed up in humanitarian language. The UK defence secretary at the time, John Reid said: "We're in the south to help and protect the Afghan people to reconstruct their economy and democracy. We would be perfectly happy to leave in three years time without firing one shot." A Canadian diplomat subsequently admitted to me that this was the only way of selling the operations to a sceptical public.

For a couple of years, discussions on Afghanistan took on an Alice in Wonderland dimension where words became devoid of their usual meaning. Observer columnist Nick Cohen wrote perhaps the most extraordinary article ever on the subject when he blamed the lack of delivery of aid projects for a failure to consolidate the military defeats that were supposedly being inflicted on the Taliban. In fact the problem was the exact opposite. There has never been a lack of aid, but a lack of security, which at root is a governance problem and for which counter-insurgency can never be a substitute.

The 2006 "surges" are now widely recognised to have been catastrophic failures. The larger "Obama surge" of 2009 has had some successes due to sheer weight of numbers and firepower, but as the increasing number of "green on blue" attacks show, it cannot make up for the wider strategic failure.

Alternative options were on offer back in 2001. As Lucy Morgan Edwards has convincingly argued, the hardline elements in the Taliban leadership could probably have been overthrown internally, leading to a genuine reconciliation process to bring an end to the country's civil war. We had a chance to genuinely help the Afghans build a better country. Instead we are going to leave them with not much more than a bunch of empty buildings.