Most of the remaining British troops have left Afghanistan after 20 years as Boris Johnson insisted the UK is not abandoning the country.
In a Commons statement, the prime minister paid tribute to the “valour and sacrifice” of the British troops who had served in the long struggle against the Taliban.
He said that most of the remaining 750 UK military trainers with the Nato mission had already left the country.
With fears the departure of foreign troops could lead to a Taliban takeover, Mr Johnson said the UK would continue to support the government of President Ashraf Ghani with more than £100 million in development aid and £58 million for the Afghan security forces.
US President Joe Biden announced in April that he would withdraw the remaining US forces by the 20th anniversary of the 9/11 attacks in September, effectively ending international military involvement in Afghanistan.
The majority of US troops have already departed the country.
On Thursday, Mr Johnson said: “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,” he told MPs.
“We shall use every diplomatic and humanitarian lever to support Afghanistan’s development and stability.
“Of course we will continue to work alongside our Afghan partners against the terrorist threat.”