It is part of Britain’s national self-image that we win wars. The army may be smaller than it was, but it remains the world’s best. Losing is impossible to conceive. Yet in Afghanistan, Britain has just suffered a humiliating defeat, the worst in more than half a century and, arguably, ranking with the worst in modern times. The truth is inescapable: we are no longer a great economic, technological or military power.

None of the multiple and varying objectives set by three prime ministers and six defence secretaries through our engagement in Helmand province over eight years has been met, yet cumulatively it has cost at least £40bn. The bravery of British soldiers cannot be doubted: 453 have died; 247 have had limbs amputated; 2,600 have been wounded. Tragically, many uncounted thousands of Afghans have been killed; too few of them were fighters enlisted by the Taliban.

There is no improved government in Helmand. There has been no hoped-for economic reconstruction: heroin production is higher than it was. The violence between tribes, families and warlords is more entrenched. Helmand is more of a recruiting sergeant for terrorism and jihadism than it was; there have been no security gains. The central government in Kabul is more rather than less threatened. If one aim was to make the British homeland safer by victory in southern Afghanistan – a fantastical claim of last resort – Britain is now less safe.

More widely, our failure in Helmand, following on from the disaster in Basra where our forces were beaten back to the airbase outside the city and only the intervention of the US army allowed an orderly exit, has led to America’s profound re-evaluation of our usefulness as an ally. Tony Blair’s key aims for first invading Iraq to quest for nonexistent weapons of mass destruction and then pivoting into Afghanistan was to prove to the US that we were stalwart allies, consolidate the “special relationship” and so maintain Britain’s standing as a co-upholder, if junior partner, of the world order. In this, he was solidly supported by the “strategists” in the Ministry of Defence and leading generals anxious to defend their budgets.

All that has been completely dashed. Frank Ledwidge in his passionate and revelatory book Investment in Blood (the source of the figures above) quotes former vice chief of staff of the US army General Jack Keane speaking at a conference at Sandhurst in late 2013 about the twin debacles of Basra and Helmand: “Gentleman, you let us down; you let us down badly.” Ledwidge continues, having spoken to many senior American military leaders: “This is a common view among senior American soldiers.” The US commander in Afghanistan, General Dan K McNeill, is uncompromising, cited by Jack Fairweather in his no less astounding The Good War: the British “made a mess of things in Helmand”. Afghanistan has left the special relationship in tatters.

In some respects, as James Meek writes in the current London Review of Books, the whole enterprise is worse than a defeat. To be defeated, he writes, “the army and its masters must understand the nature of the conflict they are fighting. Britain never did understand, and now we would rather not think about it”. David Cameron’s assertion at the end of 2013 that the troops could come home because their mission “was accomplished” completed the political and military’s establishment’s catalogue of wholesale mis-statements, dishonesty, betrayal and refusal to acknowledge reality that characterised the whole affair. It matches the then defence secretary John Reid in 2006 declaring that the Helmand mission could be achieved without a bullet being fired. It is left to a war poet such as James Milton, who speaks to us as eloquently as the war poets of the First World War, or other ex-soldiers and ex-diplomats in their books and essays to expose the waste, delusions, third-rate thinking and grand failure of military and geopolitical strategy that led to the whole disaster.

The Ministry of Defence and the military establishment are revealed as over-optimistic boneheads. Everything militated against success. The amount of money that was squandered beggars belief. The initial assessment – asking 1,200 brave paratroopers to pacify a province that later required 30,000 Nato soldiers – was a monumental miscalculation by any standards. Too much of what was planned was driven not by military need or political calculation – but by trying to impress the US.

But the US, although much more effective than the patronising British, was, at a meta strategic level, wrong. The war against terrorism, developed by George W Bush in the hours after 9/11 with little consultation with his own military or cabinet, let alone his allies, is one of the great failures of the rightwing mind. The reflex reaction to an act of mass terror was not to outsmart, out-think and marginalise the new enemy – it was to get even by being even more violent, lawless and vicious, leading Nato into the Afghan quagmire, and the coalition in Iraq. Two trillion dollars later and hundreds of thousand dead and displaced, the world is predictably much less safe for the west than it was – and jihadism is much more entrenched.

Nor can the press escape censure. Unthinking support for the US was the mirror image of virulent Euroscepticism: initial jingoism morphed into silence as the Afghan campaign went wrong. Tough questions were rarely asked – it was the public’s growing horror at its self-evident futility that was the catalyst for the war’s end. The inability to agree to the publication date of the Chilcot inquiry into Iraq is emblematic of the toothlessness of our framework of accountability.

Britain should take a long, cool look at itself. Our military strategy needs rethinking: how, with whom and against what threats are we going to organise our security? But this needs to be part of a wider national reckoning. Right-of-centre thinking has triggered the near collapse of our banking system, a powerful movement for Scottish independence and now lost us a war. Learning nothing, the right offers more of the same – uncritical acceptance of current capitalism, detachment from the EU and sticking to great power pretensions while further hacking away at state capacity. Without change, further disasters and decline lie ahead. Mr Miliband has detractors aplenty, but one inestimable asset. On these issues he is right. The open question is whether he and his party can engineer the necessary change in time.

CHILDREN OF A LESSER WAR

We are children of a lesser war

A petty skirmish, nothing more,

The bluebirds won’t sing over

The white cliffs of Dover

For us,

There’ll be no fuss

Just a footnote in our history

No Vera Lynn, no mystery

No Nazis in the countryside

Or turning back the evil tide

Just tattered gaps in people’s lives

Grieving wives

No fly-by at the Cenotaph

Sing songs where people laugh

Through the Blitz,

Defying Fritz

We envy them that cause

Not like our wars

No equals in Afghanistan

No tussles man to man

No Luftwaffe in Iraq

No Bletchley Park

Just car bombs and smell

A cut-price hell

No Winston, just windbags

We won’t see waving flags

Just body bags and sad parades

Until a sordid peace is made

Nothing solved

Nothing gained

James Milton