After chairing an emergency meeting, the prime minister said his priority is to get remaining UK nationals – and Afghans who have helped its mission – out of the war-torn country “in the next few days”.
“We don’t want anybody bilaterally recognising the Taliban,” Mr Johnson said, speaking in Downing Street.
“We want a united position amongst all the like-minded, as far as we can get one, so that we do whatever we can to prevent Afghanistan lapsing back into being a breeding ground for terror.”
In a statement just five weeks ago, the prime minister had told Parliament there was no reason to expect an imminent Taliban triumph in Afghanistan.
But he insisted: “It’s very clear from what I said the situation in Afghanistan was going to change.
“It’s fair to say the US decision to pull out has accelerated things. But we’ve known for a long time that this was the way things were going.”
Mr Johnson spoke as Dominic Raab, the foreign secretary, rushed back from holiday to confront the crisis – amid fierce criticism of his invisibility in recent weeks.
Parliament will be recalled for one day on Wednesday to debate the dramatic events in Kabul, where the militant Islamist group is poised to declare an “Islamic Emirate of Afghanistan” from the presidential palace in Kabul.
Senior Conservatives are turning on the government over its paralysis, after the prime minister insisted the UK is hamstrung following the US pullout.
All commercial flights have been suspended from Kabul Airport, Nato says, leaving only military aircraft allowed to operate.
But Mr Johnson defended the UK’s record on evacuations, with almost 2,000 Afghans already resettled in the UK, saying: “We’re going to get as many as we can out in the next few days.”
And he said: “It is very important that the West should work collectively to get over to that new government – be it by the Taliban or anybody else – that nobody wants Afghanistan once again to be a breeding ground for terror.”
The prime minister also denied that the huge gains made in the 20 years since the 2001 US-led invasion were now doomed to disappear.
“A lot of women and girls were educated, thanks the efforts of the UK,” Mr Johnson said.
“Human rights and equalities were promoted and protected in a way that Afghanistan hadn’t seen before. Of course we don’t want to see that thrown away.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies