Britain withdrew its last military forces from southern Afghanistan on Monday after 13 years of fighting that has cost hundreds of British lives in some of the most violent regions of the country.
A ceremony at Kandahar airfield marked the departure of remaining Royal Air Force personnel after the final British base was handed over to Afghan forces in October.
Since 2001, Britain has suffered 453 military deaths during operations in Afghanistan.
"Britain's armed forces can take great pride in the completion of their deployment to southern Afghanistan," Defence Secretary Michael Fallon said in a statement.
"Thanks to their courage and dedication, the country has the best possible chance of a stable future. Our departure from Kandahar airfield therefore is an historic milestone."
Much of the British fighting took place in neighbouring Helmand province, which remains a Taliban insurgent stronghold and a centre of opium poppy cultivation.
The US-led NATO combat mission will finish at the end of this year, with about 12,500 troops staying on into 2015 to train and support the Afghan army and police.
The British contribution next year will be the supervision of an officers' training academy outside Kabul.
The security challenges facing Afghanistan were underlined on Sunday when a suicide attack killed 57 people watching a volleyball game.
Two NATO soldiers were also killed in an attack in eastern Afghanistan on Monday. NATO did not release their nationalities, in line with coalition policy.