The UK Armed Forces' mission in Afghanistan is drawing to a close, bringing 20 years of British involvement in the country near to an end.
A small number of British military personnel will temporarily remain in Afghanistan to support the transition to a new phase of UK support for the country.
The UK troops will offer diplomatic assurance to the international community in Kabul, the Ministry of Defence (MOD) said.
Although the UK officially ended its combat role, under Operation Herrick, on 26 October 2014, troops have remained in the country in non-combat capacities, on Operation Toral, part of NATO's Resolute Support Mission.
Prime Minister Boris Johnson has confirmed that the majority of UK personnel have now withdrawn from Afghanistan.
Defence Secretary Ben Wallace said: "Operation Toral is drawing to an end, but our enduring support for the Afghan Security Forces and Afghan government has not.
"We owe a huge debt of gratitude to all those who have served in Afghanistan over the past 20 years, particularly those who lost their lives.
"Their efforts have helped prevent international terrorism and set the country on the path to peace. We hope the deal struck last year will form the basis for progress," he added.
"We will now continue this important work as we transition to a new phase in Afghanistan."
Watch: Forces News joined British troops deployed on Op Toral in 2018.
'Major Strategic Mistake'
Concerns have been raised about the withdrawal of British and NATO forces from the country, which came after the US announced it would be pulling its troops out by the 20th anniversary of the 9/11 attacks in September.
It comes amid reports of Taliban gains in Afghanistan.
Conservative MP and chair of the Foreign Affairs Committee, Tom Tugendhat, who served in Afghanistan for four years with the Territorial Army, warned that the withdrawal is a "major strategic mistake".
The former head of the British Army, Crossbench peer Lord Dannatt, told Forces News Afghanistan is facing the prospect of a civil war following the drawdown of troops.
He said the UK's presence in Afghanistan "has been costly" but has neither been "a total failure" or "the success that we perhaps had in mind".
"So we have to wait and see what happens," he said.
"It does then beg the wider question as to... whether the campaign has been worth it."
On Wednesday, ahead of the announcement regarding Op Toral, Mr Johnson said he was "apprehensive" about Afghanistan, saying: "I think that the situation is fraught with risks."
Watch: Timeline of British forces in Afghanistan.
Since British forces entered Afghanistan in 2001, 457 UK personnel have been killed there and more than 150,000 have been deployed to the war-torn country.
British troops, alongside NATO allies, have helped to train 5,000 Afghan Security Forces cadets, including 330 women, at the Afghan National Army Officer Academy which was modelled on the British Army's Royal Military Academy Sandhurst, earning the nickname 'Sandhurst in the Sand'.
Operational control of the facility was handed over from NATO to the Afghan authorities in October last year.
The majority of British soldiers who have departed from Afghanistan are from 3rd Battalion, the Royal Regiment of Scotland, who have been leading the Kabul Security Force – providing force protection for coalition mentors, including a Quick Reaction Force in the capital city.
The regiment marked the drawdown of Op Toral with a flag-lowering ceremony on 24 June, the MOD said.
WATCH: A flag-lowering ceremony, carried out by the British Army's 3 SCOTS, marks the drawdown of Operation Toral.
Brigadier Oliver Brown, outgoing Commander of Op Toral, said: "The men and women who have served as part of Op Toral should be immensely proud.
"They have trained thousands of Afghan troops, helped prevent international terrorism and created the conditions for the Afghan Security Forces to succeed."
The logistical withdrawal of British personnel has been conducted across the UK Armed Forces.
The Royal Air Force has flown more than 50 flights, covering more than 100,000 nautical miles.
This includes the return of RAF Puma Helicopters, which have transported 126,000 passengers and moved 660,000kg of freight during their deployment in Afghanistan.
The MOD said the UK will 'continue to provide urgent life-saving assistance to immediate humanitarian need' through the Afghanistan Multi-Year Humanitarian Response Programme.
Financial support has been extended to Afghan security forces until 2024.
Mr Johnson told the Commons on Thursday: "I hope that no one will leap to the false conclusion that the withdrawal of our forces somehow means the end of Britain’s commitment to Afghanistan.
"We are not about to turn away, nor are we under any illusions about the perils of today’s situation and what may lie ahead."
Labour's deputy leader Angela Rayner said: "The Taliban are making gains on the ground and serious questions remain about the future stability of Afghanistan.
"A security threat remains to the wider world including to the UK, and nobody wants to see British troops permanently stationed in Afghanistan, but we simply cannot wash our hands or walk away.
"It’s hard to see a future without bloodier conflict and wider Taliban control. Already, they are on the brink of gaining control of provincial capitals and Afghan security forces are at risk of being overwhelmed."
Cover image: MOD.