UK troops in Afghanistan: Timeline of key events
For 13 years, between 2001 and 2014, the UK was involved in the conflict in Afghanistan against the Taliban and fighters from al-Qaeda.
November 2001 - Invasion
The conflict was sparked by the 9/11 terrorist attacks on the World Trade Center in New York, by members of Islamist militant group al-Qaeda.
The US accused the Taliban - then the ruling power in Afghanistan - of protecting mastermind of the attacks, Osama Bin Laden, and declared war. Britain became involved in November 2001, deploying ground troops.
The early stages of the campaign saw a massive aerial bombardment of Taliban and al-Qaeda targets, while special forces went in on the ground to fight alongside the Afghan Northern Alliance, which opposed the Taliban.
Kabul was the first city captured by the Northern Alliance, on 13 November.
December 2001 - Fall of Kandahar
On 7 December, the Fall of Kandahar saw the Taliban driven from its last stronghold.
Then British Prime Minister Tony Blair hailed it as a victory, calling it "a total vindication of the strategy we have worked out from the beginning".
Meanwhile, Afghan groups agreed a deal for an interim power-sharing government, and Hamid Karzai, a former mujahedeen spokesman, was sworn in as its head.
2002 - Nato peacekeepers
The UK became part of Nato-led operations - the International Security Assistance Force (ISAF) - in 2002. The first contingent of foreign peacekeepers was made up of personnel from 18 countries. The forces had a mandate that extended only to helping the Afghans maintain security in Kabul and surrounding areas.
By April 2002, UK forces were concentrated in Kabul, with 1,700 soldiers working alongside other allied units.
2003 - Taliban fights back
By 2003, the Taliban had regrouped, and a resurgence began. While the world was largely focused on Iraq, Taliban gunmen started to cross the porous border from Pakistan into southern Afghanistan.
The group recruited new members in the Pashtun areas, and small training camps set up along the mountainous border. The insurgency was supported by various tribal groups, and gained momentum after ISAF air strikes led to civilian deaths.
2004 - Terror tactics
Taliban militants began to adopt the terror tactics of Iraqi insurgents. Before 2004 suicide bombings were a rarity in Afghanistan, but in 2005 there were 21, and in 2006 there were 141 suicide attacks.
In January 2004, a British soldier was killed in a suspected suicide attack, the first to be killed in a combat role in the conflict.
The Taliban's use of improvised explosive devices (IEDs) mainly targeting vehicles also increased, with 1,297 just in 2006.
The number of coalition troops in Afghanistan grew to try to counter the insurgency. Meanwhile, elections were held which established acting president Hamid Karzai as the elected president of Afghanistan.
2006 - Camp Bastion
In 2006, British forces moved into Helmand province in the south, one of Afghanistan's most volatile regions. Camp Bastion was built in the desert, providing the launch pad for thousands of British service personnel stationed in the south.
At its peak it was home to 40,000 people - the size of Reading - and supported up to 600 aircraft and helicopter movements a day. It was the UK's fifth busiest airfield.
British forces faced regular attacks from the Taliban, and as violence increased, reinforcements were sent in. At the peak of the campaign in Helmand alone, there were 137 UK bases and about 9,500 UK troops were stationed there. Increasingly they were fighting alongside the fledgling Afghan forces.
The increase in operations coincided with a sharp rise in the death toll. Thirty-nine troops died in 2006, compared with five between 2001 and 2005. There were 42 deaths in 2007 and 51 in 2008.
2009 - Bloodiest year
In total, 456 UK troops lost their lives in the conflict - a death rate much higher than that of the conflict in Iraq, or the Falklands war. The bloodiest year was 2009, when 108 troops died. There were also more than 100 deaths the following year in 2010.
On return to the UK, fallen British troops passed through the town of Wootton Bassett in Wiltshire, where local people would turn out to line the streets as a sign of respect. In 2011, the town was granted royal patronage in recognition of its role.
In 2010 came the largest joint offensive to date involving 15,000 British, American and Afghan troops, to push the Taliban from their strongholds in central Helmand.
Meanwhile a timetable for handing over security control from ISAF to Afghan forces by the end of 2014 was agreed at a Nato summit in Lisbon.
October 2014 - UK withdraws
By 2011, calls were growing for the British to pull out, and Prime Minister David Cameron pledged to end combat operations by 2015, saying, "I believe the country needs to know there is an end point to all of this".
In spring 2014, Task Force Helmand was closed, and Camp Bastion was handed over to Afghan security forces. The last UK combat troops left Afghanistan in October. About 450 troops remained, their role to train, advise, and assist local Afghan forces.
The conflict had cost the UK £40bn.
However, the Taliban were still a potent force. On the day before British combat troops left, an Afghan police commander was killed by Taliban gunmen, and nationwide more than 4,000 Afghan security forces were killed in 2014.
December 2015 - British troops redeployed
Although Taliban representatives and Afghan officials have been involved in informal peace talks, the Taliban insists it will not stop fighting until all foreign troops leave the country. In September 2015, the Taliban briefly captured the northern city of Kunduz in their most significant advance since being forced from power in 2001.
Then, with reports that the Taliban are close to overrunning Sangin town in Helmand providence, British military personnel were deployed. The Ministry of Defence says a small number of personnel already in the country have been sent to Camp Shorabak, near the location of Camp Bastion, in an "advisory role" - but says they will not be in combat.