▶ Watch Video: Biden administration prepares for the collapse of Kabul

The U.S. Embassy in Kabul, Afghanistan will be evacuated of all but a handful of key personnel within the next 36 hours, and all American diplomats should be out of the country entirely by August 31, multiple security and diplomatic sources in Washington and Kabul told CBS News. The evacuation comes as a U.S. defense official says it could be just a matter of days before the Taliban takes control of the capital, a city with more than 4 million people.

The U.S. military has already sent thousands of troops to safely remove State Department staff from the U.S. Embassy in Kabul. On Saturday, President Biden ordered another 1,000 troops from the 82nd Airborne at Fort Bragg to join the operation, bringing the total to 5,000.

Those who remain at the embassy will be special agents from the Bureau of Diplomatic Security Service and top decision-makers, including the ambassador. Security engineers will also stay behind to continue destroying sensitive hard drives, taking down cameras and stripping the embassy of alarms.

The rest of the embassy staff, as well as those awaiting special immigrant visas, local employees and their families will be shuttled to Kabul’s International Airport, where a fallback embassy will be set up in an airplane hangar to keep processing visas and evacuations and prepare to leave. 

The scramble to evacuate U.S. staff comes as the Taliban keeps advancing toward Kabul, gaining territory. The group is also replenishing its ranks with Taliban prisoners they free along the way and seizing weapons and vehicles left by retreating Afghan forces trained by the U.S.

“We are always worried about weapons falling into an adversary’s hands,” Defense Department Press Secretary John Kirby said.

Those adversaries now control more than two-thirds of the country. On Friday, they seized the capital of Helmand Province where U.S. troops once fought some of their bloodiest battles.

David Martin and Roxana Saberi contributed to this report.