Britain's government on Tuesday said it was too early to decide on how to work with the Taliban on issues such as tackling ISIS in Afghanistan.
A spokesman for UK Prime Minister Boris Johnson said any co-operation would depend on the Taliban upholding its pledge to respect human rights after its takeover of the country this month.
"At this stage it is too early to dictate if and how we would work with the Taliban going forward," the spokesman said. "A lot will depend on their actions from now. As we have said throughout, we intend to put pressure on them to uphold these standards and claims."
With the government's management of the withdrawal under intense scrutiny the Foreign Secretary Dominic Raab sought to stress on Tuesday that the 20-year Nato mission in Afghanistan brought “real tangible gains” and that military involvement had brought better education, fewer maternal deaths and a diminished terrorist threat.
Mr Raab welcomed the UN Security Council’s demand that the Taliban protect those gains by upholding human rights and denying a safe haven to terrorists.
The last US troops departed Afghanistan on Monday, ending a two-decade operation – America's longest war – that ultimately failed to keep the Taliban out of power.
Mr Raab said Britain had to “recognise the new reality” of a Taliban regime but “focus on what we can do going forward”.
He said diplomatic staff were dealing with the hundreds of cases of people left behind after the two-week evacuation.
The US exit means Nato powers no longer have access to Kabul airport, from where tens of thousands of people were flown to safety after the Taliban took power.
Nato forces will carry out counterterrorist missions from outside Afghanistan if necessary, US President Joe Biden said.
The head of the UK’s Royal Air Force, Air Chief Marshal Sir Mike Wigston, told the Daily Telegraph that air strikes to combat ISIS were possible.
“What this boils down to is that we've got to be able to play a global role in the global coalition to defeat Daesh … whether it's strike or whether it's moving troops or equipment into a particular country at scale and at speed,” he said.
Until commercial flights can resume at the airport, safe passage out of Afghanistan would have to take place via third countries, Mr Raab said.
“That is a challenge, which is why we are holding, very squarely, the Taliban to their explicit assurances,” he told Sky News.
“They must allow safe passage, not just for our nationals, but other Afghans – particularly vulnerable ones – who wish to leave.”
Politicians in Europe hope to enlist Afghanistan’s neighbours to help process evacuees and prevent a refugee wave from spreading to the EU.
Security Council envoys described the safe passage out of Afghanistan as a vital demand issued to the Taliban.
“This is of the utmost importance to us,” said US ambassador Linda Thomas-Greenfield. “Everybody must be allowed to safely leave Afghanistan, for whatever reason, whenever they want, by air or by land.”
The resolution was put forward by Britain, France and the US. It was passed after China and Russia, who have veto power in the council, abstained.
Passage of the resolution “makes clear that the international community stands with Afghans”, UK Prime Minister Boris Johnson said.
“There can be no return to repression or terror. We will push as one voice for safe passage, humanitarian access and respect for human rights."
UK ambassador Barbara Woodward stressed the need to protect the rights of women, children and minority groups in Afghanistan.
Western leaders have highlighted schooling for girls – prohibited during the Taliban’s reign in the 1990s – as one of the most important gains of the past 20 years.
“There were real tangible gains for all that sacrifice,” Mr Raab said. “We hadn’t seen, in those 20 years, Afghanistan used as a base for terrorist attacks abroad.
“We had, with our aid money and our wider development policy, got 10 million more children into education. If you look at the maternal mortality rate … that was down by close to 50 per cent.”