The Taliban’s relentless, rapid advance across Afghanistan brought them on Sunday to the outskirts of the capital, Kabul, the last major city controlled by the government.
As it became clear that the Taliban were at the gates of the capital, thousands of Afghans who had sought refuge there after fleeing the insurgents’ brutal military offensive watched with growing alarm as the local police seemed to fade from their usual checkpoints.
Wais Omari, 20, a street vendor in the city, reflected those concerns. “The situation is not good,” he said. “If it gets worse, I will hide in my home.”
The Taliban, in a statement, said that they were in negotiations with the government and would not take the capital by force.
“The Islamic Emirate instructs all its forces to stand at the gates of Kabul, not to try to enter the city,” a spokesman said, using the name by which the insurgents refer to themselves.
The Afghan government had no immediate public response. Afghan news media reported that President Ashraf Ghani had left the country on Sunday afternoon.
The United States military stepped up its evacuation of American diplomatic and civilian staff. A core group of American diplomats who had planned to remain at the embassy in Kabul were being moved to a diplomatic facility at the international airport, where they would stay for an unspecified amount of time, according to a senior United States official.
On the civilian side of the airport, a long line of people waited outside the check-in gate, unsure if the flights they had booked out of the country would arrive.
After days in which one urban center after another fell to the insurgents, the last major Afghan cities that were still controlled by the government, other than Kabul, were seized in rapid succession over the weekend.
The insurgents took Mazar-i-Sharif, in the north, late on Saturday, only an hour after breaking through the front lines at the city’s edge. Soon after, government security forces and militias — including those led by the warlords Marshal Abdul Rashid Dostum and Atta Muhammad Noor — fled, effectively handing control to the insurgents.
On Sunday morning, the Taliban seized the eastern city of Jalalabad. In taking that provincial capital and surrounding areas, the insurgents gained control of the Torkham border crossing, a major trade and transit route between Afghanistan and Pakistan.
The Taliban offensive, which started in May when the United States began withdrawing troops, gathered speed over the past week. In city after city, the militants took down Afghan government flags and hoisted their own white banners.
Despite two decades of war with American-led forces, the Taliban have survived and thrived, without giving up their vision of creating a state governed by a stringent Islamic code.
After the Taliban took control of Afghanistan in the 1990s, movie theaters were closed, the Kabul television station was shut down and the playing of all music was banned. Schools were closed to girls.
Despite many Afghans’ memories of years under Taliban rule before the U.S.-led invasion in 2001, the insurgents have taken control of much of the country in recent days with only minimal resistance.
Their rapid successes have exposed the weakness of an Afghan military that the United States spent more than $83 billion to support over the past two decades. As the insurgents’ campaign has accelerated, soldiers and police officers have abandoned the security forces in ever greater numbers, with the cause for which they risked their lives appearing increasingly to be lost.
Mr. Ghani, the Afghan president, had resisted pressure to step down. In a recorded speech aired on Saturday, he pledged to “prevent further instability” and called for “remobilizing” the country’s military. But the president was increasingly isolated, and his words seemed detached from the reality around him.
On Sunday, Tolo TV, one of Afghanistan’s main independent channels, relayed that “two sources” had said that Mr. Ghani had left the country, adding that it was not clear where he was headed. Lotfullah Najafizada, head of news at Tolo TV, said in a Twitter post that Mr. Ghani had departed with his core team.
The speed of the Taliban’s advance has thrown exit planning into disarray. While many analysts had believed that the Afghan military could be overrun after international forces withdrew, they thought it would happen over months and years. Now it risks being completed in a matter of days and weeks.
President Biden has accelerated the deployment of an additional 1,000 troops to Afghanistan to help get American citizens out. He made it clear that he would not reverse his decision to withdraw all combat forces.
“I was the fourth president to preside over an American troop presence in Afghanistan — two Republicans, two Democrats,” Mr. Biden said on Saturday afternoon. “I would not, and will not, pass this war onto a fifth.”