- War in Afghanistan (2001-present)
media captionJohnson: "We've known for a long time this was the way things were going"
Prime Minister Boris Johnson has said no one wants Afghanistan to become a "breeding ground for terror", as the Taliban enters capital Kabul.
Speaking after a meeting of the emergency Cobra committee, he said the situation "continues to be extremely difficult" and will get even more so.
He called on "like-minded" powers to work together and not recognise any new government without agreement.
The UK Parliament is being recalled on Wednesday to discuss the situation.
Afghan President Ashraf Ghani has fled the country as the militants stand on the brink of taking total control.
- Follow live updates on Afghanistan
- Taliban move into Kabul as Afghan president flees
- UK scholarships for Afghan students paused
The situation is "extremely difficult" in Afghanistan and is "getting more difficult", said Mr Johnson.
"Our priority is to make sure we deliver on our obligations to UK nationals, to all those who have helped the British effort in Afghanistan over 20 years, and to get them out as fast as we can."
Mr Johnson said the British ambassador – who remains in Kabul – was "working around the clock" to do this and has been at the airport processing applications.
The prime minister said he wanted to make sure other like-minded nations did not "prematurely" recognise the Taliban.
He added: "What we're dealing with now is very likely the advent of a new regime in Kabul. We don't know yet exactly what kind of regime it will be".
Reports from Kabul say the Taliban have now seized the presidential palace. It comes after thousands of Afghans sought refuge in the city in recent weeks.
media captionTaliban spokesman Suhail Shaheen contacted the BBC's Yalda Hakim live on air
Mr Johnson said the UK would work with the UN Security Council and other Nato countries to stop Afghanistan "lapsing back into terror" and called for an "international effort" from the West.
He admitted the US decision to pull out of the country had "accelerated things" in Afghanistan but said "we've known for a long time this was the way things would go".
The Foreign, Commonwealth and Development Office said the UK has reduced its diplomatic presence but that government staff "continue to work to provide assistance to British nationals and to our Afghan staff".
"We are doing all we can to enable remaining British nationals, who want to leave Afghanistan, to do so," said a spokesperson.
The Foreign Office has advised more than 4,000 British citizens thought to be in Afghanistan to leave.
About 600 British troops sent to help with the departure of Britons, Afghan staff and interpreters have now arrived in Afghanistan.
Mr Johnson said the UK was "working very fast" on getting people out of the country, adding: "We certainly have the means at the moment to get them out."
He spoke to the Nato Secretary General Jens Stoltenberg and the UN Secretary General António Guterres about the current situation in Afghanistan on Sunday.
In those talks, he called for meetings of Nato's North Atlantic Council and the UN Security Council to take place as soon as possible to enable high-level international discussions on these issues, said Downing Street.
Labour leader Keir Starmer has described the situation in Afghanistan as "shocking", saying the priority had to be to evacuate British personnel and support staff.
Foreign Secretary Dominic Raab was returning to the UK today, the Foreign, Commonwealth and Development Office said, when asked to confirm he had been on holiday.
Mr Raab earlier spoke of his "deep concerns about the future for Afghanistan".
Labour peer Lord Robertson of Port Ellen – the former defence secretary who was secretary general of Nato from 1999 to 2003 – said it was "stunning that the foreign secretary would stay on holiday as our mission in Afghanistan disintegrated".
"The horrors unfolding with every minute demand focused attention from the top," he said.
Lord Robertson added he was "sickened by the prospect of the 20th anniversary" of the 11 September attacks "being marked by the Taliban back in control of Afghanistan".
Meanwhile, Scotland's First Minister Nicola Sturgeon has called on the UK to offer "as much refuge for vulnerable Afghans as possible".
She said the Scottish government is "willing to play our full part and do all we can to help those in peril as a result of the horrifying situation currently unfolding".