It is easy to forget that the nine-year war in Afghanistan began its life as "Operation Enduring Freedom". In the discursive vacuum that followed 9/11, such trivialised and overblown rhetoric was commonplace – as were notions that security and democracy in Afghanistan and the Middle East could be achieved through US-led invasion and occupation.

While the original "war on terror" paradigm has long been discarded – foreign secretary David Miliband has stated the obvious that the strategy was simply wrong, as was the implication that the correct response to terrorism was foremost a military one – here we are still fighting its wars.

And most British people do not buy the justifications offered by the government for doing so. Its reasoning on Afghanistan has been incoherent, inconsistent and disingenuous. First Tony Blair, then Gordon Brown, told us that priority number one was Osama bin Laden and ridding the world of al-Qaida. Then we were getting rid of the Taliban. We were the benevolent invaders, bringing democracy to a downtrodden people. Or we were stabilising the region between Pakistan and Afghanistan. Our streets would be safer. It was about women's rights or the opium trade.

In Washington, Barack Obama considers General Stanley McChrystal's request for up to 40,000 more troops, which would take the number of foreign troops in Afghanistan towards 150,000. Yet he knows that the deployment of thousands more foreign soldiers has so far failed to stem the tide of Taliban influence. Recent insurgency attacks in Kabul, Peshawar and Baghdad show the violence and insecurity in the region only seem to be increasing.

What's more, the grotesque parody of the recent elections exposed the hollowness of "democracy" in what is now the world's second most corrupt regime.

Despite the efforts of the UN and the western powers, there is no credible national government in Afghanistan. In part, wilful amnesia in foreign policy has prevented us from learning from past mistakes; attempts to impose a western model of democratic governance on a failing state, with ill-informed notions about the culture, geography or history of the place and its people, are bound to end badly. Worse still, attempting to do so through the barrel of a gun and via million-dollar bribes to corrupt warlords and criminals can only result in a failure of devastating proportions.

Every possible strategy for the way forward contains unpalatable elements – such is the depth of this quagmire. But what we know is that military action, characterised by desperation rather than well-considered strategic aims, has failed to achieve security or democracy. To reach that long-term goal of securing rights and freedoms, we need a strong, accountable and legitimate government – as well as a multilateral agreement with Pakistan and other neighbouring countries to provide guarantees of support for Afghan security.

The failure to address what one American official describes as the "criminal mafia" surrounding the newly inaugurated president, Hamid Karzai, has given Taliban insurgents another argument with which to appeal to ordinary Afghans. And while Karzai has been strong-armed into committing to anti-corruption measures by western dignitaries, there are signs that he may already be falling short of his promises.

Pressure must be maintained on Karzai, but the international community must play its part in preventing criminals from profiteering from US and Nato military contracts.

Nato and the UN need to pursue talks with traditional leaders and the more moderate Taliban groups over a potential power-sharing agreement, and halt Nato offensives with the aim of agreeing a ceasefire – enabling foreign troops to withdraw. Afghan Taliban loyalty seems generally to lie with tribe and locality – not to a nationalistic, homogenous organisation – so we must focus aid efforts on local communities and help build solid political institutions from the top down to provide good governance at every level.

Sustainable economic development should be a top priority. According to a recent survey by Oxfam, the majority of Afghan people blame poverty for the war. Military solutions are not the answer here; people need support for agriculture, improved infrastructure, education and health services. In a manner typical of foreign invaders, western governments have thrown money at the problem – and it has failed to reach those who need it most. The UK should now be funding a concerted NGO effort on the ground, rather than channelling the majority of its aid through corrupt government officials. And having evaluated their programmes aimed at developing the capacity of the Afghan government, they should continue and expand those found to be effective.

Some are rightly concerned that if foreign troops leave, there will be even more bloodshed. Withdrawal will create a power vacuum that al-Qaida and the Taliban can occupy. However, we know that the current strategy is not working. What people want more than anything is security – and more military action will not bring security. We must halt offensive missions now.

At the same time, the international community must increase the humanitarian and reconstruction effort, build capacity and promote good governance. Following our misguided foreign policy endeavours, we have a responsibility to leave the country in order. We need to genuinely win hearts and minds, tackle corruption head-on, drop our misguided and unsuccessful war against drugs and instead work with farmers to promote development from the ground up. We must switch our efforts towards creating friends and allies among the people of the region, transparently operating for their interests and making every effort to hand over control of affairs as rapidly as possible.

Only Afghans can solve Afghan problems – and they must be empowered to do so without the burden of foreign occupation.