KABUL—U.S. officials have intensified planning for an emergency evacuation of the American embassy in Kabul amid concern that a worsening security situation in Afghanistan could imperil the remaining military and diplomatic corps, as well as other Americans.

The preparations are taking place as part of the U.S. withdrawal of Afghanistan, which the Pentagon said Friday would take place by the end of August. As part of the withdrawal, officials said, the U.S. military withdrew from Bagram air base, the centerpiece of American military operations in Afghanistan for nearly 20 years.

The plan to withdraw by the end of August represents a shift from earlier plans to remove all U.S. forces by as soon as this month.

The expanded planning for an embassy evacuation, reflecting an increase in concern that a Taliban offensive could overwhelm U.S. security and Afghan government forces guarding the U.S. Embassy, has not been previously reported. An evacuation could involve not only hundreds of personnel at the U.S. Embassy but thousands of other Americans in the country.

SHARE YOUR THOUGHTS

What do you see in Afghanistan’s future after American troops withdraw? Join the conversation below.

The U.S. military routinely conducts planning for nearly any contingency, including what it calls noncombatant evacuations at embassies and other locations. Because of the more pressing concerns in Afghanistan, planners stepped up preparations, contemplating evacuation operations based on scenarios that are more specific, officials familiar with the planning said.

U.S. officials emphasized that there is no immediate need for an evacuation of American personnel and that preparations were still in planning, though with more urgency. The military is coordinating with the U.S. State Department, officials said.

“It’s not the plan, it’s a contingency,” said one official. “It’s still squarely in the box of just-in-case.”

While details of the plan are classified, the U.S. is basing helicopters and their crews at the nearby Kabul airport that could be used as part of an evacuation, U.S. officials said. An evacuation operation also could require a large influx of American airborne troops and large strategic aircraft to evacuate not only embassy personnel, but potentially other Americans in the country, an operation that could take days to complete, according to people familiar with such operations.

Related Video

President Biden said he will withdraw all U.S. troops from Afghanistan by Sept. 11, marking the second time in less than two years that an American president has set a date to end involvement in the Afghan conflict -- the longest war in U.S. history. Photo: Andrew Harnik/Getty Images (Video from 4/14/21) The Wall Street Journal Interactive Edition

In 1975, the U.S. conducted a large-scale helicopter evacuation of the U.S. Embassy compound in Saigon, Vietnam, a rescue that took place two years after the departure of U.S. combat units.

In Afghanistan, Taliban fighters have taken over more than 100 districts across Afghanistan, many of them since President Biden in April said that the U.S. would end its role in the nearly 20-year conflict.

U.S. officials had estimated that the government of Afghanistan could fall to the Taliban within three years. The Wall Street Journal reported last week that intelligence analysts had concluded that the Kabul government could fall within six months of the U.S. departure, according to a new classified intelligence assessment.

Asked Friday about U.S. abilities to support the Afghan government, Mr. Biden said he had confidence in the withdrawal plan and wanted Afghans to step up. While the U.S. can provide some air support, he said, “The Afghans are going to have to do it themselves with the Air Force they have.”

Aerial porters loaded a helicopter into a military transport aircraft in Bagram on June 16.

Aerial porters loaded a helicopter into a military transport aircraft in Bagram on June 16.

Photo: sgt 1st class corey vandiver/Agence France-Presse/Getty Images

The U.S. Embassy staff in Kabul will expand to include the U.S. military headquarters in Kabul into one expansive compound, and is expected to house hundreds of personnel, officials said.

U.S. officials said they have plans for as many as 650 U.S. military personnel to be assigned to the embassy. Marine Gen. Frank McKenzie, the head of U.S. Central Command, which oversees American forces in the region, will have the authority to assign an additional 300 personnel to the embassy, based on security needs, a senior U.S. official said.

The assignment of U.S. personnel to the embassy and airport would include security personnel for the embassy, as well as a Marine Corps quick response force for emergencies. Other personnel will be based at the embassy complex to assist the Afghan security forces with aviation and other needs, officials said.

Every U.S. Embassy world-wide maintains a classified emergency action plan to be activated in a crisis, a U.S. official said. The documents, which are supposed to be updated yearly, lay out tripwires, such as deteriorating security or health conditions, that would spark action, the official said.

Spouses of some U.S. diplomats, but not children, currently are stationed at the Kabul embassy compound, the official said, although it remains to be seen if that practice will continue.

With the shutdown of the Bagram air base, hundreds of other American military personnel will be assigned to Hamid Karzai International Airport in Kabul, officials said. Helicopters and their crews and maintenance teams also will be based there.

Afghan soldiers stood guard at the gate of Bagram Air Field on Friday.

Afghan soldiers stood guard at the gate of Bagram Air Field on Friday.

Photo: mohammad ismail/Reuters

Other military personnel at the Kabul airport will monitor attacks in the area and operate the anti-rocket, artillery and mortar systems, at the Kabul airport. The Kabul airport also is guarded by troops from Turkey, a North Atlantic Treaty Organization ally in Afghanistan.

The U.S. departure from Bagram left the U.S. military headquarters in Kabul as the remaining military outpost in the country, with several hundred U.S. troops still assigned there, along with troops assigned to the embassy and airport.

U.S. officials say that all forces, weaponry, vehicles and other equipment now have been removed from Bagram, the largest installation the U.S. had in Afghanistan.

An Afghan district administrator for Bagram told the Associated Press that the American withdrawal at Bagram was conducted without sufficient local coordination, and that dozens of looters had to be removed by Afghan forces. Col. Sonny Leggett, a spokesman for the U.S. command, said there had been adequate coordination for a smooth transition, “leaving the Afghan security forces in the best possible position as we depart.”

The Taliban called the U.S. withdrawal from Bagram a positive step. “Afghans can move closer to peace & security with complete withdrawal of foreign forces,” said Taliban spokesman Zabiullah Mujahid on Twitter.

Taking advantage of the American departure, the Taliban launched a major offensive in recent weeks, capturing about one-quarter of Afghanistan’s local government districts.

There was no public observance of the closing of the Bagram base, which was one of the first to house American forces, drones, jet fighters and special forces troops in Afghanistan after the 2001 U.S. invasion.

Without Bagram, the U.S. has no existing remaining capability for providing combat air support to U.S. or coalition forces, including Afghan troops, from inside the country.

Future air support operations must come from bases in Qatar and other installations in the Middle East, or from an aircraft carrier in the region. All of those are hours away from Afghanistan, diminishing their immediate effectiveness, officials have said.

For a time, the White House considered keeping open the Bagram Air Field, built by the Soviet Union decades ago. But that plan was shelved when Mr. Biden directed last month that the airfield be shut down as planned.

The top U.S. commander in Afghanistan, Army Gen. Scott Miller, remains stationed in the country for now. His departure, which had been expected as soon as Monday, was postponed for at least a week, U.S. officials said, part of an attempt to shore up Afghan forces. Gen. Miller also will travel to Brussels, defense officials said. A two-star commander, Navy Rear Adm. Peter Vasely, will replace Gen. Miller.

Write to Gordon Lubold at Gordon.Lubold@wsj.com, Nancy A. Youssef at nancy.youssef@wsj.com and Warren P. Strobel at Warren.Strobel@wsj.com