The US embassy in Kabul Sunday warned its citizens against travelling to the Kabul airport, citing "potential security threats".
Hamid Karzai International Airport has seen a chaotic crush of people hoping to flee the Taliban takeover of the country a week ago.
As thousands of Americans and Afghans wait at the airport for flights or gather nervously outside its gates, there have been "sporadic" reports, confirmed by the Pentagon, of Taliban fighters or other militants beating and harassing people trying to flee.
"We are advising US citizens to avoid traveling to the airport and to avoid airport gates at this time unless you receive individual instructions from a US government representative," the alert from the US embassy in Kabul said.
The warning gave no detail on the danger but a White House official later said aides had briefed President Joe Biden on local "counterterrorism operations", including against Daesh.
"This morning, the president met with his national security team... They discussed the security situation in Afghanistan and counter-terrorism operations, including ISIS-K," the official said.
Known as Islamic State in Khorasan (IS-K or ISIS-K), the Afghan IS branch has been on the back foot since suffering heavy losses in 2019, but retains the ability to carry out attacks in urban areas.
Up to 15,000 Americans need to be evacuated from Afghanistan, according to Biden, who says the administration wants to get at least 50,000 Afghan allies and their family members out of the country.
Pentagon spokesman John Kirby said the military was urgently trying to complete the evacuation of Kabul by the end of August.
"We've been very honest about the fact that we know that we're fighting against both time and space," he said, adding, "that's the race we'e in right now."
US Major General Hank Taylor said 17,000 people had so far been taken out since the operation began on August 14, with many flown first to Qatar or Kuwait. The total included 2,500 Americans.
He added that six military C-17 planes and 32 charter flights had departed Kabul airport in the past 24 hours with 3,800 people aboard -- a sharp decline from the previous day.
On Friday, the US military sent helicopters to rescue over 150 Americans unable to reach the airport gates, an official said.
Biden has promised to help any American in Afghanistan seeking to evacuate, saying: "Any American who wants to come home, we will get you home."
But he has also admitted that the presence of thousands of US soldiers at the airport does not guarantee safe passage through Kabul.
In a telephone briefing Sunday, senior government officials from Canada described conditions around the airport as "tenuous, chaotic and desperate."
They said Canadian troops had evacuated nearly 1,000 Afghans from the country, adding: "This is a dangerous mission."
Former president Donald Trump, who was unseated by Biden in the 2020 election, berated his successor for the "botched exit" of American forces from Afghanistan.
He also praised the Taliban as "great negotiators, tough fighters" during a rally in Alabama.
Trump signed a deal with the Taliban that, subject to conditions, would have resulted in the complete withdrawal of US troops by May.
He also secured the release from a Pakistani prison of Taliban founder Abdul Ghani Baradar, the highest profile leader of the movement seen in public since the fall of Afghanistan.