UK Prime Minister Boris Johnson has denied British soldiers killed in Afghanistan died in vain, even as the country's troops began deploying for an evacuation mission.
He was speaking as Taliban fighters swept through Afghanistan to close in on the capital, Kabul, and full control of the country.
The insurgents captured Pul-i-Alam in Logar province on Friday, bringing them within 60km of Kabul's southern city limits
The original Nato campaign in Afghanistan was launched after the 9/11 2001 attacks. These were planned from Afghanistan by Al Qaeda, when the Taliban was running the country.
Mr Johnson said that after two decades it was not “realistic” to expect outside powers to impose a “combat solution” – as the Taliban appear to be imposing its military solution.
“There isn't a military solution. Thanks to the efforts of the UK armed services and all the sacrifices they made we have seen no Al Qaeda attacks against the West for a very long time.
“I think we have got to be realistic about the power of the UK or any power to impose a military solution – a combat solution – in Afghanistan.
“What we certainly can do is work with all our partners in the region around the world who share an interest with us in preventing Afghanistan once again becoming a breeding ground for terror.”
In the Taliban victories over the last week, large areas of Helmand province, where hundreds of UK troops have died, were seized. Provincial capital Lashkar Gah was reported to have fallen on Friday.
Across Afghanistan, 454 UK military personnel were killed in the Nato campaign.
“I don't think that it was in vain. If you look back at what has happened over the last 20 years there was a massive effort to deal with a particular problem that everybody will remember after 9/11,” Mr Johnson said.
“That was successful. To a very large extent the threat from Al Qaeda on the streets of our capital, around the UK, around the whole of the West was greatly, greatly reduced.
“I believe it was right, it was worth it and what we must do now is not turn our backs on Afghanistan.
The first British troops have deployed on an evacuation to remove the remaining British nationals from Afghanistan.
Germany has reduced its embassy staffing to the “absolute minimum,” Foreign Minister Heiko Maas said.
The first forces of a US Marine Corps battalion are also in Kabul to stand guard as evacuation flights are speeded up.
Canada is also sending forces to help its staff leave Kabul.
About 600 members of British 16 Air Assault Brigade are being sent to Kabul as part of Operation Pitting.
The number of staff working at the British embassy in Kabul has been reduced to a core team.
Troops will provide force protection and logistical support for the relocation of British citizens and assist with speeding up the Afghan Relocation and Assistance Policy.
This will ensure interpreters and other Afghan staff who worked alongside UK forces in Afghanistan can relocate to the UK as soon as possible, the Foreign Office hopes.
“Protecting British nationals and ensuring their safety as they leave Afghanistan is our top priority,” said Defence Secretary Ben Wallace.
“Over the next few weeks, we shall all do our very best to support the Afghan government and those that have worked with us over 20 years.”
Mr Wallace added that he was not ruling out future military action.
“I’m going to leave every option open. If the Taliban have a message from last time, you start hosting Al Qaeda, you start attacking the West or countries, we could be back,” he said.