As They Leave Afghanistan, Britons Ask, "Why?" LONDON - After the lives lost and the exhausted treasure, what was it all for? That question is being asked here and in Kabul as British troops, like their more numerous American counterparts, prepare to relinquish combat duties in Afghanistan next year after a tenure that appears to have achieved few of the goals set by their political masters. In March 2002, Britain committed 1,700 soldiers to join American forces in what was portrayed as little more than rooting out the remnants of Taliban and Qaeda forces after the American-led invasion six months earlier. The logic was that if the streets of Britain were to be kept safe, then terrorism's distant havens had to be dismantled. But that brief early deployment did not shield Britain from the more immediate menace of homegrown terrorism. On July 7, 2005, four suicide bombers killed themselves and 52 travelers on the London transit system. None of them had ties to Afghanistan. By 2009, the official mantra was the same, but the geographic reach had been redefined. Mission creep had raised the number of British soldiers to 9,000. The border areas between Afghanistan and Pakistan, said Gordon Brown, the prime minister then, were "the crucible of global terrorism" threatening "the streets of Britain." In late 2013, a new statistic has entered the calculations of loss: 444 British military personnel dead - the single most potent figure fueling the outrage expressed by many in Britain when Hamid Karzai, the president of Afghanistan, told the BBC last week that the entire NATO exercise had been pointless. The years of combat "caused Afghanistan a lot of suffering and a lot of loss of life and no gains because the country is not secure," he said, adding: I am not happy to say there is partial security because that is not what we're seeking. What we wanted was absolute security and a clear cut war against terrorism. Cpl. Tom Neathway, a Briton who lost both legs and his left arm to a Taliban booby-trap five years ago, said of Mr. Karzai: "I think he's stupid to say that. We may not be out there for the right reasons. But comments like Mr. Karzai's, the corporal said, make a soldier "just wonder whose side he is fighting on." The resentments draw on a long history of interventions and invasion that left British imperial armies bloodied from Kandahar, Afghanistan, the 19th century to Kut, Iraq, in World War I. Then, as now, the imperative to mold far-flung events collided with resistance. But the precedents did not deter Tony Blair as prime minister from joining the United States as a junior partner in fighting in both countries, only to discover that history could not simply be rewritten when the invaders tired of the fray and wished to go home. Iraq is now seized with some of its bloodiest, sectarian violence since the darkest days of the American-led occupation. Afghanistan is threatened with internecine bloodletting the moment Western forces withdraw next year. While politicians and generals conspire to declare the campaign a success, the columnist Simon Tisdall wrote in The Guardian, "Karzai's comments are a salutary reminder that all is far from well in Afghanistan - and things could turn very messy, very soon." According to the Web site iCasualties.org, 2,287 American troops have been killed there since 2002. The coalition losses amount to far fewer than the thousands of civilian deaths tallied by the United Nations, which blames insurgents for three-quarters of noncombatant fatalities. But, arguably the most troubling legacy is that the avowed target of the Afghan campaign - jihadism - has simply dissipated to re-form elsewhere, in Somalia, Yemen, the desert hide-outs of North Africa and the newest killing fields of Syria. Most worrisome to the counterterrorism authorities here, scores of Britons who have joined the battle against President Bashar al-Assad may now return home, even as the Afghan war winds down without the clear-cut outcome invoked by Mr. Karzai. Some specialists depict the shift of focus as the most ominous in a decade. "Syria is a very profound game changer," said Charles Farr, who heads the Office for Security and Counter Terrorism, "and the significance of it is still emerging."