Afghan militiamen join Afghan defense and security forces Wednesday during a gathering in Kabul, Afghanistan. Credit: Rahmat Gul / AP

WASHINGTON — Roughly 650 U.S. troops are expected to remain in Afghanistan to provide security for diplomats after the main American military force completes its withdrawal, which is set to be largely done in the next two weeks, U.S. officials told The Associated Press.

Moreover, several hundred additional American forces will remain at the Kabul airport, potentially until September. They’ll assist Turkish troops providing security, a temporary move until a more formal Turkey-led security operation is in place, the officials said Thursday.

Overall, officials said the U.S. expects to have American and coalition military command, its leadership, and most troops out by July Fourth, or shortly after that, meeting an aspirational deadline that commanders developed months ago.

The officials were not authorized to discuss details of the withdrawal and spoke to the AP on condition of anonymity.

The departure of the bulk of the more than 4,000 troops that have been in the country in recent months is unfolding well before President Joe Biden’s Sept. 11 deadline for withdrawal. And it comes amid accelerating Taliban battlefield gains, fueling fears that the Afghan government and its military could collapse in a matter of months.

Secretary of State Antony Blinken, speaking Friday in Paris, noted the increased violence and cited “a real danger” that if the Taliban tries to take the country by force, “we’ll see a renewal of a war or possibly worse.”

But, Blinken said, the Biden administration came to the conclusion that not removing U.S. troops, as the Trump administration had promised the Taliban in February 2020, would have been a bad choice. The administration believes the Taliban would have resumed attacks on U.S. forces, prompting an escalation of the war.

“Had we not announced that we were leaving, then that restraint, in terms of attacking our forces and attacking the capitals, would have ended,” Blinken said.

 He said a continued U.S. presence “certainly would have helped significantly” the Kabul government. “But what is almost certain is that our military would have come to us and said, well, the situation has changed, we need more forces. And we would have repeated the cycle that we’ve been in for 20 years. And at some point, you have to say this has to stop.”

Biden faces strong criticism from some Republicans for pulling out of Afghanistan, even though President Donald Trump made the 2020 deal with the Taliban to withdraw all U.S. forces by May 2021.

Officials have repeatedly stressed that security at the Hamid Karzai International Airport in Kabul is a critical requirement to keeping any U.S. diplomatic staff in Afghanistan. Still, the decision to keep additional troops there for several more months makes it more complicated for the Biden administration to declare a true end to America’s longest war until later this fall.

In a statement Thursday night, Pentagon press secretary John Kirby said that as Biden has ordered, the U.S. will complete the withdrawal by early September. “Nothing has changed about that goal.” Kirby said. “The situation is dynamic, and we review our progress daily. Speculation by unnamed sources about potential changes to that timeline should not be construed as predictive.”

On Friday, Afghan President Ashraf Ghani and Abdullah Abdullah, chair of the High Council for National Reconciliation, are meeting with Biden at the White House. The two Afghan leaders also are to meet at the Pentagon with Defense Secretary Lloyd Austin.

Getting most troops out by early July had been in doubt because of complications including an outbreak of COVID-19 at the U.S. Embassy and the push to get Afghan interpreters and others who helped the U.S. out of the country. Officials said U.S. commanders and NATO allies in Afghanistan have been able to overcome logistical hurdles that might have prolonged the withdrawal process. But they also warned that plans in place for the final stages of the U.S. military withdrawal could change if airport security agreements fall through or there are other major, unforeseen developments.

As recently as last week, there was discussion of possibly extending the U.S. troop presence at Bagram airfield, north of Kabul, but officials said the U.S. presence at the base is expected to end in the next several days.

The roughly 650 U.S. troops that are planned to be a more permanent force presence in Afghanistan will provide security for the U.S. Embassy and some ongoing support at the airport. Officials said the U.S. has agreed to leave a C-RAM — or Counter-Rocket, Artillery, Mortar system — at the airport, as well as troops to operate it, as part of an agreement with Turkey. The U.S. also plans to leave aircrew for helicopter support at the airport.

According to the officials, Turkey has largely agreed to provide security at the airport as long as it receives support from American forces. U.S. and Turkish military officials are meeting in Ankara this week to finalize arrangements.

On Wednesday, Army Gen. Mark Milley, chair of the Joint Chiefs of Staff, cited progress toward agreement with Turks on airport security. “I feel very comfortable that security at the Kabul airport will be maintained and the Turks will be a part of that,” he said.

The U.S. troop departure is ramping up just as the administration moves ahead with plans to evacuate tens of thousands of interpreters and others who worked with American forces during the war and now fear for their safety.

A senior administration official said Thursday that planning has accelerated in recent days to relocate the Afghans and their families to other countries or U.S. territories while their visa applications are processed. The official spoke on the condition of anonymity to discuss unannounced plans. The administration intends to carry out the evacuation later this summer, likely in August, according to a second official familiar with the deliberations but not authorized to discuss them publicly.

The Pentagon has said the military is prepared to assist the State Department as needed but indicated that charter flights might be adequate to move the Afghan visa applicants, thus not necessarily requiring a military airlift.

Story by Lolita C. Baldor and Robert Burns.