US soldier inspects the site of a suicide attack targeting foreign troops in Jalalabad on November 13, 2014
After 13 years, the United States is winding down its war in Afghanistan, plagued by doubts about what was accomplished at such a high cost.
Instead of a sense of triumph at the close of the longest conflict in America's history, there is mostly regret and fatigue over a war that claimed the lives of more than 2,300 American troops and cost more than a trillion dollars.
US commanders insist the Afghan security forces will hold the line in a stalemate with the Taliban. But some officials fear a repeat of Iraq, in which an American-trained army virtually collapsed in the face of a jihadist onslaught.
A large majority of Americans now say the war was not worth it, and only 23 percent of US soldiers believe the mission has been a success, according to recent polls.
But when it began, the war enjoyed overwhelming support and victory seemed within reach.
Less than a month after Al-Qaeda's attacks of September 11, 2001, president George W. Bush captured the nation's sense of righteous anger as he announced military action in Afghanistan in a televised address in October.
The goal was to "disrupt the use of Afghanistan as a terrorist base of operations," Bush said, and to attack the Taliban regime that had hosted Al-Qaeda and refused to hand over its leaders.
- Toppling the Taliban -
US objectives were met with stunning speed. Al-Qaeda training camps were wiped out and Northern Alliance fighters -- backed by US-led air strikes and a small number of American special forces -- toppled the Taliban regime within a month.
For the United States, the war seemed all but over.
But the Taliban eventually regrouped from safe havens in neighboring Pakistan, even as Washington's attention shifted to a new war in Iraq.
The Taliban grew into a virulent insurgency that exploited resentment of a corrupt, ineffective government in Kabul.
The United States formed the backbone of an international force that found itself in a protracted fight with insurgents.
The US-led contingent steadily expanded -- while the goals of the war became increasingly ambitious as well.
Washington and its allies embraced the lofty ideals of nation-building, vowing to fight corruption, foster economic development, and forge a "stable, democratic state" in an impoverished land mired in war for decades.
The results were often disappointing. International aid helped build roads and schools, but it also was blamed for fueling rampant corruption, with some of the money ending up with the insurgents.
Attempts to broker peace talks with the Taliban in recent years came to nothing. Critics say Washington missed a chance at cutting a deal early in the war, when the insurgents were on the retreat.
Fighting the elusive Taliban, with their homemade bombs and Pakistani sanctuaries, proved frustrating for Western troops, who struggled to grasp the language and tribal rivalries of an alien culture.
Commanders appealed for more troops. And Washington kept sending forces "in the vain hope that something might somehow improve," wrote retired general Daniel Bolger, author of "Why We Lost."
Having reached a peak of more than 100,000 US forces, the American presence is down to about 11,000 troops, now that NATO's combat mission is over.
- 'Big test' -
The balance sheet for the campaign is decidedly mixed.
The intervention deprived Al-Qaeda of a sanctuary, ousted the Taliban from power, eased the repression of women and created an Afghan army that could make it difficult for the insurgents to return to their once dominant role, analysts said.
But Al-Qaeda -- even after its leader Osama bin Laden was killed by US commandos -- has spawned cells elsewhere and inspired new extremists in Syria and Iraq, while women's advances are fragile and could easily unravel.
The Taliban may no longer run ministries but they are far from defeated and could yet turn the tide against the Kabul government's army, which has suffered unsustainably high casualties and desertions.
"The Taliban have nowhere near the power they did in 2001, but they are certainly not finished," said Vanda Felbab-Brown, a senior fellow at the Brookings Institution think tank.
US officials hope a huge investment in the Afghan security forces will pay off, but already the insurgents have clawed back control in some areas in the south where American troops have pulled out.
The newly created security force, riddled with ethnic divisions, remains "a question mark," Felbab-Brown said.
"Next year is a big test for them," said Carter Malkasian, author of a book on the war who worked as a US diplomat for two years in southern Helmand province.
"If they lose ground, that's an indication that this war is going to keep going," he told AFP.
"If that happens, the Taliban are going to get bolder, because the Taliban are not going to see a reason to negotiate."