Britain's war in Afghanistan has come to an end after 13 years and the loss of 453 lives of British servicemen and women.
In a symbolic ceremony at Camp Bastion, the Union Flag was lowered, along with US and Nato flags, to mark the formal handover of power to Afghan Forces.
All British soldiers will now leave Afghanistan within days. At its peak, Bastion held around 40,000 people, and the number of British troops in the country as a whole reached a high of 9,500.
Thousands of soldiers have returned to Britain in recent months, leaving just a few hundred troops operating in the country.
Tonnes of military equipment have also been returned in time to meet the deadline of ending combat operations by the end of 2014, including 3,345 vehicles, 50 aircraft and 5,500 standard shipping containers worth of items.
Defence secretary Michael Fallon said: "It is with pride that we announce the end of UK combat operations in Helmand, having given Afghanistan the best possible chance of a stable future.
"Our armed forces' tremendous sacrifice laid the foundations for a strong Afghan Security Force, set the security context that enabled the first democratic transition of power in the country's history, and stopped it being a launch pad for terrorist attacks in the UK."
The impending closure of the last major British base in Afghanistan marks the end of Britain's ground war in the country.
A few dozen British military personnel will remain in Kabul to coordinate an officer training facility known as "Sandhurst-in-the-Sand".
Special Forces will also continue to operate in the region, and the US will maintain a force of around 10,000 troops in Afghanistan next year, after reaching an agreement with the new Afghan president Ashraf Ghani.
Camp Bastion was opened in 2006 in response to a spike in Taliban attacks, and has been Britain's main operating base in Afghanistan for eight years. A further 136 smaller bases were dotted around Helmand Province in the south of the country.
The cost of Britain's security operation in Afghanistan is estimated to be in the region of £37bn.
Bastion became the third busiest British airport after Heathrow and Gatwick, and an 11,500ft runway was built allowing the largest transport planes to fly in at any time of the day or night.
Brigadier Robert Thomson, the most senior British officer in Helmand, said he was proud of what Britain had achieved during its operation in Afghanistan.
"We can be extremely proud of the part we have played in building a capable, credible and confident Afghan force," he said.
"They have the baton, they are ready, and I am struck by their courage and commitment.
"We have travelled some hard yards in Helmand alongside our coalition allies, and every single service and branch of the Armed Forces has been part of that effort.
"We will never forget the 453 soldiers, sailors and airmen who have made the ultimate sacrifice."
Meanwhile, BBC political journalist Andrew Marr said Britain's political class have refused to acknowledge or apologise for the mistakes that were made during the UK's war on terror in Afghanistan.
The UK deployed troops to Afghanistan in 2001 as part of a Nato response to the 9/11 terrorist attacks in the US. In 2006, the British effort moved to southern Afghanistan, when Task Force Helmand was formed in April to tackle a growing insurgency in the region.