The US and the Taliban have signed an agreement aimed at paving the way towards peace in Afghanistan after more than 18 years of conflict.
Under the deal, the US and its Nato allies will withdraw all their troops from the country in 14 months if the hardline Islamist movement upholds its commitments to stop attacks.
But why is the US fighting a war in Afghanistan and why has it lasted so long?
On 11 September 2001, attacks in America killed nearly 3,000 people. Osama Bin Laden, the head of Islamist terror group al-Qaeda, was quickly identified as the man responsible.
The Taliban, radical Islamists who ran Afghanistan and protected Bin Laden, refused to hand him over. So, a month after 9/11, the US launched air strikes against Afghanistan.
As other countries joined the war, the Taliban were quickly removed from power. But they didn’t just disappear — their influence grew back and they dug in.
Since then, the US and its allies have struggled to stop Afghanistan’s government collapsing, and to end deadly attacks by the Taliban.
“We did not ask for this mission, but we will fulfil it,” US President George W Bush said when he announced the first air strikes against Afghanistan on 7 October, 2001. The raids were in response to the 9/11 attacks, which killed 2,977 people in New York, Washington and Pennsylvania.
The mission, he said, was “to disrupt the use of Afghanistan as a terrorist base of operations and to attack the military capability of the Taliban regime”.
The first targets were military sites belonging to the hardline Taliban group who ruled the country. Training camps for al-Qaeda, the terror group run by 9/11 plotter Osama Bin Laden, were also hit.
But 18 years on, it’s hard to argue the US mission has been fulfilled — the Taliban may play a part in ruling Afghanistan again if peace talks do eventually
The Taliban first took control of the capital Kabul in 1996, and ruled most of the country within two years. They followed a radical form of Islam and enforced punishments like public executions.
Within two months of the US and its international and Afghan allies launching their attacks, the Taliban regime collapsed and its fighters melted away into Pakistan.
A new US-backed government took over in 2004, but the Taliban still had a lot of support in areas around the Pakistani border, and made hundreds of millions of dollars a year from the drug trade, mining and taxes.
As the Taliban carried out more and more suicide attacks, international forces working with Afghan troops struggled to counter the threat the re-energised group posed.
In 2014, at the end of what was the bloodiest year in Afghanistan since 2001, Nato’s international forces — wary of staying in Afghanistan indefinitely — ended their combat mission, leaving it to the Afghan army to fight the Taliban.
But that gave the Taliban momentum, as they seized territory and detonated bombs against government and civilian targets. In 2018, the BBC found the Taliban was openly active across 70% of Afghanistan.
Afghanistan had been in a state of almost constant war for 20 years even before the US invaded.
In 1979, a year after a coup, the Soviet army invaded Afghanistan to support its communist government. It fought a resistance movement — known as the mujahideen — that was supported by the US, Pakistan, China and Saudi Arabia, among other countries.
In 1989, Soviet troops withdrew but the civil war continued. In the chaos that followed, the Taliban (which means “students” in the Pashto language) sprang up.
They first rose to prominence in the border area of northern Pakistan and south-west Afghanistan in 1994. They promised to fight corruption and improve security and, at that time, many Afghans were tired of the excesses and infighting of the mujahideen during the civil war.
It’s thought the Taliban first appeared in religious schools, mostly funded by Saudi Arabia, which preached a hardline form of Islam.
They enforced their own austere version of Sharia, or Islamic law, and introduced brutal punishments. Men were made to grow beards and women had to wear the all-covering burka.
The Taliban banned television, music and cinema and disapproved of girls’ education.
And because the Taliban gave shelter to militants from the al-Qaeda group, it made them an immediate target for an attack by US, Afghan and international forces in the wake of 9/11.
Why has the war lasted so long?
There are many reasons for this. But they include a combination of fierce Taliban resistance, the limitations of Afghan forces and governance, and other countries’ reluctance to keep their troops for longer in Afghanistan.
At times over the past 18 years, the Taliban have been on the back foot. In late 2009, US President Barack Obama announced a troop “surge” that saw the number of American soldiers in Afghanistan top 100,000.
The surge helped drive the Taliban out of parts of southern Afghanistan, but it was never destined to last for years.
As a result, the Taliban were able to regroup. When international forces withdrew from fighting, Afghan forces left to lead the charge were easily overwhelmed. To make matters worse, Afghanistan’s government, that is full of tribal division, is often hamstrung.