Stay Updated on Developing Stories

Afghan President Ashraf Ghani flees the country as Taliban forces enter the capital

Kabul, Afghanistan(CNN) Taliban fighters entered Afghanistan's Presidential Palace hours after President Ashraf Ghani fled the country on Sunday, a milestone in the insurgent group's assumption of control over capital city Kabul. One unit shared pictures of the palace interior -- intact, but empty and apparently abandoned by Afghan officials -- on an official Telegram account.

The Taliban had been in talks with Afghanistan's government over who would rule the nation, following the militant group's strikingly rapid advance across the country, in which it seized power over dozens of key cities, often with little to no resistance. But those talks are likely to have been upended by the sudden departure of President Ghani.

Afghans in Kabul rushing home after news broke the Taliban had reached the outskirts of the Afghan capital on Sunday.

With so much territory now in hand, the Taliban appears to have little reason to compromise. In an apparent "handover" ceremony, the Taliban claimed the palace with three Afghan government officials present, according to Al Jazeera, which carried the appearance live. One Taliban security official said there was a "peaceful handover of government facilities ongoing across the country." Another spoke briefly in English to say that he had formerly been held by the US in Guantanamo, a claim that CNN cannot independently verify.

Spokesman Zabihullah Mujahid has also said that Taliban forces would begin entering areas of the city where government officials and security forces had abandoned their posts, to impose order.

"This morning the Islamic Emirate released a statement that our forces were outside Kabul city and we did not want to enter Kabul through military ways," he said. "However, now we are getting reports that the district police offices are evacuated, police has left their job of ensuring the security, also the ministries are emptied and the security personnel of the Kabul administration has fled."

A general view of Kabul on Sunday.

The Taliban's decisive takeover of the country and the US' drawdown of its forces is a bitter end to nearly two decades of war that cost many lives, resources and little progress in state building.

The US' withdrawal from the country opened a clear path for the Taliban to take on and defeat the Afghan security forces. Many major cities fell with little to no resistance, including the key city of Jalalabad, which the Taliban seized on Sunday.

The country is now facing the Taliban's return to power, which, if it's anything like it was in the 1990s, would mean a deterioration in civil liberties, particularly for women and girls whose freedoms grew under the civilian government.

In a Facebook post following his departure from the country, Ghani said he had chosen to leave in order to avoid bloodshed. The Taliban now face "a new historical test," he added: "Either they will protect the name and honor of Afghanistan or they will prioritize other places and networks."

"In order to win legitimacy and hearts of the people, it is necessary for Taliban to give assurance to all the people, tribes, different segments, sisters and women of Afghanistan and to make clear plans and share them with the public," he wrote.

Afghanistan's acting defense minister, General Bismillah Mohammadi, slammed the fleeing president in a brief tweet Sunday, writing: "They tied our hands behind our backs and sold the homeland, damn the rich man and his gang."

Chaotic scenes as US evacuates staff

The US, which launched a major operation to evacuate its embassy staff from the capital, appears to have been caught off guard by the sheer speed the of the Taliban's push toward Kabul. On Sunday, two sources familiar with the operation to evacuate US personnel from the embassy in Kabul said all staff there would be pulled out over the next 72 hours, including the top officials.

That deadline is a rapid acceleration of the process that was only announced on Thursday, when US President Joe Biden said he would send 3,000 troops to arrive by the end of Sunday. Over the weekend, Biden increased that number, authorizing 6,000 in total. He is expected to address the US in the next few days about the crisis in Afghanistan, according to a senior administration official.

US Special Representative for Afghanistan Zalmay Khalilzad had requested that Taliban fighters not enter Kabul until the US citizens are evacuated, according to a source familiar with the discussions.

A US Chinook helicopter flies near the US Embassy in Kabul on Sunday during an operation to evacuate embassy staff.

Kabul's international airport has become the focus of much attention as foreign governments hurry to evacuate citizens.

US troops earmarked for security duty in Kabul will be tasked with securing the entire perimeter of the airport, according to a defense official. This is a result in part of hundreds of Afghans rushing on to the airfield to try to get flights out, as well as the potential for Taliban attacks and growing unrest at the airfield.

A witness who spoke to CNN described chaos at the Hamid Karazi International Airport, from where throngs of foreigners were trying to board planes out of the country.

"There are big crowds trying to get in and at one stage shooting erupted," the witness said, but could not say where the shooting had come from.

"There was also a warning of a ground attack and we were in a bunker for the past hour, but now it is all clear," the witness added. "It's all foreigners here. One young European woman was freaking out."

The majority of US Embassy staff are already out of the diplomatic compound now and are at the airport, a US official told CNN. Approximately 500 staff members were flown out of the country on Sunday, with some 4,000 still to go. A small number of core personnel, including the top US diplomat in the country, will remain at the airport for now, two sources who spoke to CNN on the evacuation said.

The UK and French embassies are also working to facilitate the evacuation of their citiziens, though the French embassy has been relocated to a site at the airport due to security concerns, according to a statement issued on Sunday by French Foreign Minister Jean-Yves Le Drian.

A source at the airport in Kabul also told CNN that a number of high-ranking Afghan officials, including some of Ghani's advisors, had arrived at the VIP lounge earlier and were waiting for a flight out of the city. Their destinations were unknown.

CNN's Caitlin Hu in New York, Sarah El Sirgany in Cairo, Vasco Cotovio in London and Kylie Atwood in Washington contributed to this story.