Sixteen years of U.S. warfare in Afghanistan have left the insurgents as strong as ever and the nation's future precarious. Facing a quagmire, President Donald Trump on Monday outlined his strategy for "victory" in a country that has historically snared great powers and defied easy solutions.
America's longest-running war began well as U.S.-led forces quickly toppled the Taliban government and disrupted al-Qaida leaders who plotted the Sept. 11, 2001, attacks from Afghan soil. But the fighting never ended.
In recent years, security has gradually worsened as Taliban insurgents, enjoying sanctuary in Pakistan, have gained a foothold across the country. Afghanistan's rampant heroin trade, official corruption and infighting among the nation's elite have only compounded problems.
Trump is the third U.S. president to grapple with the Afghan challenge. A look at the phases of the U.S. involvement to date:
Less than a month after the 9-11 attacks, a massive U.S. air campaign targets al-Qaida fighters and Taliban troops, training camps and air defences. Anti-Taliban forces of the Northern Alliance enter Kabul as the Taliban flee.
By December 2001, Afghan groups agree on a deal in Bonn, Germany, for an interim government.
With Afghanistan liberated from Taliban control, the U.S. military force grows to 2,500 as troops scour the mountainous Tora Bora region looking for al-Qaida leader Osama bin Laden. He eludes capture. Although President George W. Bush remains leery of supporting nation-building efforts in Afghanistan, the U.S. expands its counterterrorism operations. By the end of 2002, there are 9,700 U.S. troops in the country.
DEMOCRACY AND DISTRACTION
In November 2004, Hamid Karzai, who had served two years as interim leader, is the clear winner in Afghanistan's first direct election for president. The Bush administration hails the vote as a key step in the nation's transformation. Millions of girls return to school after being barred under the Taliban. As the country opens up, Western aid helps the economy grow, at least in urban areas.
But the Taliban, enjoying sanctuary in Pakistan, show signs of re-emergence, launching sporadic attacks on government forces in eastern Afghanistan. Although Karzai is an ethnic Pashtun, which comprise the bulk of Taliban recruits, his government alienates what is Afghanistan's main ethnic group. Karzai's administration is dominated by former commanders of the Northern Alliance.
U.S. troop numbers swell to 20,000, but Washington's attention increasingly turns to Iraq. The U.S. invades in March 2003, toppling Iraqi dictator Saddam Hussein. It struggles with the aftermath. Soon Iraq is gripped by an explosion of sectarian violence that preoccupies Bush until he leaves office.
MORE WESTERN TROOPS, MORE VIOLENCE
In 2006, NATO assumes responsibility for security across the whole of Afghanistan, pumping troops into Taliban heartlands in the south of the country.
The U.S. ups its forces in the country to 30,000. Britain, Canada and others boost their contributions. But the violence and lawlessness worsens.
Production of opium, the raw material of heroin, soars to a record high, funding the insurgency and fueling official corruption. Tensions grow between Afghanistan and Pakistan over cross-border Taliban attacks.
In the fall of 2008, Joint Chiefs of Staff chairman Adm. Mike Mullen concedes, "I'm not sure we're winning."
President Barack Obama, vowing to refocus U.S. efforts in Afghanistan, enters office in 2009 endorsing shifts to a counterinsurgency strategy designed to protect Afghan civilians rather than hunt down Taliban.
He quickly sends in 21,000 more forces. After a prolonged policy review, Obama orders an additional surge, bringing troop levels to a high of 100,000 by August 2010. He says the U.S. will begin withdrawing forces by 2011. Critics say the drawdown date diminishes the incentive for the Taliban to negotiate for peace.
Bin Laden is killed in a U.S. special operations raid in Pakistan in March 2011.
Obama then presses ahead with plans to hand over security responsibilities to Afghanistan by 2014. By the end of that year, NATO ends its combat mission in the country. U.S. relations with Karzai, however, deteriorate. A contested election to replace Karzai introduces a more pro-U.S. leader in Ashraf Ghani, but his government is bitterly divided.
With violence reaching post-2001 highs and Afghan security forces taking heavy casualties, Obama backtracks on plans to virtually withdraw all U.S. forces by the end of 2016.
He leaves office with 8,400 troops still in the country.
The U.S. kills new Taliban leader Mullah Mansour in a drone attack in Pakistan in May 2016, derailing peace talks. But on the battlefield, the Taliban are in the ascendant and threaten provincial capitals in both the north and south. The Islamic State group gains a foothold in eastern Afghanistan.
Trump says little about Afghanistan during his first seven months in office, while the military grows antsy.
The Pentagon proposes sending in nearly 4,000 more U.S. troops to increase training of Afghan forces and counterterrorism operations, but the administration is divided on strategy. Nearly everyone considers the fight a stalemate, and some in Trump's administration even propose withdrawing or handing over the entire American effort to private security contractors.
Among Afghans, anti-Western sentiment grows over deteriorating security, even in the capital, Kabul. The economy also suffers, partly as a result of a drawdown in foreign forces. As Trump is poised to announce his plan, Afghanistan's government controls only about half of the country.
After months of debate, Trump finally unveils his strategy in a prime-time television address.
He says the U.S. will win "in the end," defeating al-Qaida and IS fighters, and ensuring the government doesn't fall to the Taliban. He refuses to provide troop increase numbers or timelines, saying military assistance would be determined by results and the co-operation of Afghanistan's beleaguered government.