All week politicians, media and the military have strained every nerve to turn public sympathy over the deaths of British squaddies into support for the US-led occupation of Afghanistan. After a year of parades, a new Armed Forces Day and a stream of censored reports of derring-do from the frontline, the killing of 15 soldiers in 10 days has triggered a barrage of war propaganda. Having all but ignored the same number who died in Helmand province last month, every tabloid and Whitehall stop has been pulled out to capitalise on the emotions unleashed by the continuing sacrifice of British teenagers in an endless war.

From the Ministry of Defence-orchestrated processions of coffins through the Wiltshire village of Wootton Bassett to the black ties worn by Sky TV presenters as they address generals as "sir", the message is clear: this war is a "patriotic duty", in the prime minister's words. The only argument in parliament yesterday was whether the government had provided enough helicopters and boots on the ground to do the job.

Meanwhile, the BBC seems to have largely abandoned any attempt at neutral reporting, as its newsreaders warn "Britain's resolve is being put to the test" and presenters speculate anxiously about what might happen if public "support" for the war "were to weaken". We can't pull out now, the war's cheerleaders warn, or our boys will have died in vain.

But the campaign isn't working. As in other Nato states, most people in Britain haven't supported the Afghan war for several years. A Guardian/BBC Newsnight poll this week found that 56% want troops to pull out by the end of the year; an ITN poll showed 59% backing withdrawal. Significantly, both surveys found opposition to the war highest in the working class communities from which most of those doing the fighting are drawn.

Heightened awareness of British casualties may rally support for an army anxious to overcome its humiliation in Iraq. But after eight years of fighting, during which a kaleidoscope of justifications has been offered for the continuing Nato occupation, public scepticism has clearly bitten deep.

This was a war, after all, launched by George Bush and Tony Blair with the stated aim of killing or capturing Osama Bin Laden and the Taliban leader Mullah Omar – and destroying al-Qaida. Eight years later, not one of those objectives has been accomplished. Bin Laden and Omar are still at large, while al-Qaida has spread into Pakistan, Iraq and dozens of other countries around the world.

Nor have any of the other fast-changing war aims – from bringing democracy, development and good governance, to ending the oppression of women and cracking down on opium production – fared much better. British and other Nato troops are now defending one of the world's most corrupt governments, a cabal of narco-trafficking warlords rubber-stamped by a fraudulent election in which political parties weren't even allowed to stand; Afghanistan has become the heroin capital of the world; and the position of many women, as women's leaders such as the suspended Afghan MP Malalai Joya argue, is now worse than it was under Taliban rule.

Most absurd of all is the government's claim that the Afghan war is preventing terrorism on the streets of Britain. The exact opposite is the case. There were no al-Qaida-style terror attacks in the UK before 2001. And Britain's role in the invasion and occupation of Afghanistan and Iraq, along with its support for Israel's occupation of Palestinian land – cited both by the bombers themselves and a string of intelligence reports – has been a central factor in motivating would-be jihadists, who have in any case been mostly home-grown and can train in Leeds as well as Lashkar Gah if they want to carry out atrocities.

On the ground in Helmand, the British occupation has been a disaster. In 2006, there were around 150 US troops in the whole province and violence was minimal. Now there are 9,000 British and 10,000 American troops, who have proved a magnet for the Taliban and local resistance. Helmand is now the most violent part of the country and one in 10 schools and clinics have been closed because, as Oxfam's Ashley Jackson in Kabul puts it: "Anything with a link to the government is a target."

The thousands of civilians killed in the fighting, doubling every two years, far outnumber Nato casualties, but barely register in the western media. Set against the 140 villagers, mostly children, slaughtered in one US aerial attack in Farah province in May, last Friday's eight British dead pale by comparison. No wonder that polling of Afghans – even under military occupation, which would be expected to skew the results towards the occupier – show that a majority oppose Barack Obama's current surge, want negotiations with the Taliban, and all foreign troops out within two years. In the south and east, most want them out now.

The US escalation, already engulfing north-west Pakistan, cannot conceivably pacify the country with what will still be less than 100,000 Nato troops. As Graham Fuller, the CIA's former station chief in Kabul, argues, the presence of US and Nato troops in Afghanistan is "now more the problem than the solution" – just as the reason British soldiers are dying in Afghanistan isn't because they haven't got enough helicopters, but because they're an occupying force in another Muslim country where they're not wanted.

The pressing alternative is presented by the war's supporters as "abandoning" Afghanistan to a "bloodbath". That is to stand reality on its head. The only way to end the war is the withdrawal of foreign troops as part of a wider political settlement negotiated with all significant Afghan forces on the ground, including the Taliban – and guaranteed by regional powers and neighbouring states: Pakistan, Iran, China and India.

Such a process is bound to take place eventually – whether or not the British government has the guts to follow the example of Canada and The Netherlands and announce plans to pull out earlier. But the assumption must be that a strategic US decision to accept the inevitable, turn its back on the wreckage of the war on terror and withdraw from Afghanistan is going to be a slow and painful process. In the meantime, many more people – mostly Afghans – will shamefully die in vain.