There could be an "highly lethal" terror attack at Kabul airport within hours, a minister has warned.
Armed Forces minister James Heappey said there were "very credible" reports of a "severe" threat in the capital.
The Foreign Office last night issued new guidance telling anyone near the airport to "move away to a safe location and await further advice".
It comes amid a race to airlift thousands from Afghanistan before foreign troops depart.
The US has set a deadline of 31 August for the withdrawal of its troops, with President Joe Biden rejecting calls from Prime Minister Boris Johnson and other allies for an extension.
Mr Heappey did not give a date for the last UK evacuation flights, but said it was likely that UK and other foreign troops would have to leave before the last American airlifts.
On Thursday, Mr Johnson said the "overwhelming majority" of eligible people had been evacuated from the country.
He added that about 15,000 had been flown out by the UK so far.
Kabul airport is currently being defended and run by the US, which has 5,800 troops on the ground - with the help of more than 1,000 UK troops.
In the update issued on Wednesday evening, the FCDO also warned that travelling by road was "extremely dangerous" with people alleged to have been "mistreated" on their way to the airport.
Speaking to BBC Radio 4's Today programme on Thursday, Mr Heappey said: "There is now very, very credible reporting of an imminent attack and hence why the Foreign Office advice was changed last night."
He later told BBC Breakfast: "The credibility of the reporting has now reached the stage where we believe that there is a very imminent, highly lethal attack possible within Kabul."
Asked by Sky News whether an attack could occur in the coming few hours, Mr Heappey replied: "Yes."
Stressing the "severe" nature of the threat, he told the BBC that it had created an "extraordinarily challenging situation, both on the ground and as a set of decisions to be taken in Whitehall".
"People are desperate, people are fearing for their lives anyway, and so I think there's an appetite among many in the queue to take their chances," he said.
He said UK troops were doing their best to provide security for those queuing, but the "reality" was that they were only holding "defined bits of ground" at the airport and at the hotel where people were being processed, and would therefore be "relying" on the Taliban for security beyond that.
Col Richard Kemp, former head of British forces in Afghanistan, said the risk of a terror attack had been present from the start of evacuation efforts.
He told BBC Breakfast: "I have no doubt that our forces are fully aware of the threat and already, for days now, have been taking measures to try and mitigate it, to prevent something like that happening."
Meanwhile, Mr Heappey added that nearly 2,000 people have been evacuated on eight RAF flights in the past 24 hours, with 11 more flights scheduled on Thursday.
Asked about the estimate that nearly 2,000 people eligible for the UK government's relocation programme - the Afghan Relocation and Assistance Policy (ARAP) - remained in Afghanistan, Mr Heappey said the actual number was "potentially half" of that.
Defence Secretary Ben Wallace told MPs that some Afghans wanting to flee to Britain may be better off trying to reach one of the country's borders and making their way to a third country.
Speaking in an online meeting, Mr Wallace is reported to have signalled there were few places left on evacuation flights and said "not everyone is going to get out".
But former Tory defence minister Tobias Ellwood, one of the MPs at the meeting, has said any land corridors would have to be agreed with the Taliban if the UK was to avoid the risk of putting people in harm's way.
Another Conservative MP, Julian Lewis, said he had raised the issue of 12 academics in Afghanistan who are at risk from the Taliban.
Mr Wallace told the MPs that all cases raised with him of people who are in serious danger would be considered by the teams processing urgent requests for evacuation.
Distressing scenes at Kabul airport
By Secunder Kermani, BBC Pakistan and Afghanistan correspondent
It's incredible and very distressing to see huge numbers of people still turning up to the airport.
Whole families, old women sitting in wheelbarrows because they are unable to walk, young children being carried by their parents.
Just an endless stream walking through the filth, the dust, the heat. At times, they're facing gunshots.
A large number of them have no realistic chance of boarding the evacuation flights because they just don't have the right paperwork, making it even more difficult for the handful that do have the right paperwork or are foreign citizens to push their way through the crowd.
I was speaking to one elderly woman yesterday, her son was a former interpreter for the US Army.
They had all been told to go to the airport but they'd spent six days and six nights living in awful conditions in a kind of make-shift camp.
I asked her, given all of this, isn't it worth just sticking it out in Afghanistan and seeing how things go?
She said: "We just don't have that option. The Americans should shoot us or they should let us through - but we are not staying here."
Any information about the threat from IS-K (a branch of the Islamic State group) or warnings about potential attacks from suicide bombers takes a long time to filter down to those people making their way to the airport - and they're so desperate that their priority is just to find some way out.
Labour MP Yvette Cooper, who chairs the Home Affairs Select Committee, said the latest government advice was a "further blow to desperate families who have been struggling to get to the airport".
She said so many people who have worked with the UK government and military were now at grave risk.
The BBC's chief international correspondent Lyse Doucet said many Afghans would remain unaware of the Foreign Office advice and would continue to make their way to Kabul airport.
Since the Taliban takeover, more than 82,000 people have been airlifted out of Kabul airport, US Secretary of State Antony Blinken has said.
Mr Blinken said the Taliban had promised to allow foreigners and Afghans to leave beyond the end of August, adding that the US and its allies had "a responsibility to hold [the Taliban] to that commitment".