Afghanistan’s government collapsed Sunday with the flight from the country of President Ashraf Ghani and the entry into the capital of the Taliban, effectively sealing the insurgents’ control of the country after dozens of cities fell to their lightning advance.

On Sunday evening, former President Hamid Karzai announced on Twitter that he was forming a coordinating council with Abdullah Abdullah, chair of the Afghan delegation to peace talks, and Gulbuddin Hekmatyar, leader of the Hesb-i-Islami party, to manage a peaceful transfer of power. Karzai called on both government and Taliban forces to act with restraint but resolutely to curb any individuals causing chaos or acting irresponsibly.

As it became clear that members of the Taliban had entered the gates of the capital, Kabul, 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.

At 6:30 p.m. local time, the Taliban issued a statement that their forces were moving into police districts in order to maintain security in areas that had been abandoned by the government security forces. Taliban fighters, meeting no resistance, took up positions in parts of the city after Zabiullah Mujahid, spokesperson for the Taliban, posted the statement on Twitter.

“The Islamic Emirates ordered its forces to enter the areas of Kabul city from which the enemy has left because there is risk of theft and robbery,” the statement said. The Taliban had been ordered not to harm civilians and not to enter individual homes, it added. “Our forces are entering Kabul city with all caution.”

As the sun set behind the mountains in the western part of the city, the traffic was clogged up as crowds grew bigger, with more and more Taliban fighters appearing on motorbikes, police pickups and even a Humvee that once belonged to the U.S.-sponsored Afghan security forces.

Advertising

Earlier in the afternoon, Interior Minister Abdul Sattar Mirzakwal had announced that an agreement had been made for a peaceful transfer of power for greater Kabul, and his forces were maintaining security.

“The city’s security is guaranteed. There will be no attack on the city,” he said. “The agreement for greater Kabul city is that under an interim administration, God willing, power will be transferred.”

Mirzakwal later announced a 9 p.m. curfew in the capital and called on its residents to go home.

Ghani left in a plane for Uzbekistan with his wife, Rula Ghani, and two close aides, according to a member of the Afghan delegation in Doha, Qatar, that has been in peace negotiations with the Taliban since last year. The official asked not to be named because he did not want to be identified speaking about the president’s movements.

In a Facebook video, Abdullah, former chief executive of the Afghan government, criticized Ghani for fleeing.

“That the former president of Afghanistan has left the country and its people in this bad situation — God will call him to account, and the people of Afghanistan will make their judgment,” Abdullah said in the video.

Advertising

In negotiations being managed by Abdullah, Ghani had been set to travel to Doha on Sunday with a larger group to negotiate the transfer of power but flew instead to Uzbekistan, the peace delegation member said.

Ghani had resisted pressure to step down. In a recorded speech aired 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.

With rumors rife and reliable information hard to come by, the streets were filled during the day with scenes of panic and desperation.

“Greetings, the Taliban have reached the city. We are escaping,” Sahraa Karimi, head of Afghan Film, said in a post shared widely on Facebook.

Filming herself as she fled on foot, out of breath and clutching at her headscarf, she shouted at others to escape while the could.

“Hey, woman, girl, don’t go that way,” she called out. “Some people don’t know what is going on,” she went on. “Where are you going? Go quickly.”

Advertising

Wais Omari, 20, a street vendor in the city, said the situation was already dire and he feared for the future.

“If it gets worse, I will hide in my home,” he said.

The U.S. military stepped up its evacuation of American diplomatic and civilian staff. A core group of U.S. 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 U.S. 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-e-Sharif, in the north, late 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 warlords Marshal Abdul Rashid Dostum and Atta Muhammad Noor — fled, effectively handing control to the insurgents.

Sponsored

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 U.S.-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.

Advertising

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 Joe Biden has accelerated the deployment of an additional 1,000 troops to Afghanistan to help get U.S. 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,” Biden said Saturday afternoon. “I would not, and will not, pass this war onto a fifth.”

This article originally appeared in The New York Times.