KABUL, AFGHANISTAN -- The U.S.'s top general in Afghanistan on Tuesday gave a sobering assessment of the country's deteriorating security situation as America winds down its so-called "forever war."

Gen. Austin S. Miller said the rapid loss of districts around the country to the Taliban -- several with significant strategic value -- is worrisome. He also cautioned that the militias deployed to help the beleaguered national security forces could lead the country into civil war.

"A civil war is certainly a path that can be visualized if this continues on the trajectory it's on right now, that should be of concern to the world," he said.

Miller also told a small group of reporters in the Afghan capital that for now he has the weapons and the capability to aid Afghanistan's National Defense and Security Forces.

"What I don't want to do is speculate what that (support) looks like in the future," he said.

In meetings at the White House last week with President Ashraf Ghani and Abdullah Abdullah -- the Afghan official tasked with making peace with the Taliban, President Joe Biden said the U.S. was committed to humanitarian and security assistance to Afghanistan, White House Press Secretary Jen Psaki said.

But the president also said that keeping U.S. soldiers in Afghanistan defied a peace deal the Trump administration negotiated with the Taliban and that wasn't a risk he was prepared to take.

"Given the timeline set by the prior administration, that if we did not withdraw our troops, U.S. men and women would be facing fire from on the ground and that was not something as the commander in chief, that he felt was acceptable," Psaki said.

Washington signed a peace deal with the Taliban in February 2020. It laid out the promise of a U.S. withdrawal and commitments by the Taliban to ensure Afghanistan does not harbor militants that can attack the United States. The details of those commitments have never been made public.

The Taliban have accused Washington of breaking the agreement, which called for all troops to be out by May 1, the date the final withdrawal began. U.S. officials have said the Taliban have made some progress, but it's not clear whether the insurgent group has kept its end of the deal.

The insurgent group issued orders to commanders against allowing foreign fighters among their ranks, but evidence continues to surface that non-Afghans are on the battlefield.

Still, Miller was insistent that only a political solution will bring peace to the war-tortured nation.

"It is a political settlement that brings peace to Afghanistan. And it's not just the last 20 years. It's really the last 42 years," he said.

Miller was referring to not only the U.S. war but that of Russia's 10-year occupation that ended in 1989. That conflict was followed by a brutal civil war fought by some of the same Afghan leaders deploying militias against the Taliban. The civil war gave rise to the Taliban, who took power in 1996.

American officials have said the entire pullout of U.S. troops will most likely be completed by July 4. But Miller refused to give any date or time frame, referring only to the Sept. 11 timeline given by Biden in April when he announced the withdrawal of the remaining 2,500-3,500 American troops.

Meanwhile, Taliban fighters have been over-running districts in rapid succession, many of them in the north of the country, which is dominated by Afghanistan's minorities. The north is also the traditional stronghold of many former mujahedeen leaders who have been a dominant force in Afghanistan since driving the Taliban from power in 2001 together with the U.S.-led coalition.

Several of the districts are on key roads and one is on the border with northern Tajikistan. The Taliban have issued statements saying hundreds of Afghan security forces have surrendered, most of them going to their homes after being recorded on video receiving transportation money from the Taliban.

Miller said there are multiple reasons for the collapse of these districts, including troop fatigue and surrender, psychological defeat and military defeat. But he said the escalating violence puts the country at risk of falling into a deadly civil war.

Going forward, the Afghan defense forces must focus on consolidating their strengths and establishing strategic areas and protecting them, Miller said. Losing districts to the Taliban that allows them to sever transportation and communication links threatens provincial capitals.

"As we start talking about how does this all end, the way it must end for the Afghan people is something that revolves around a political solution," he said. "I've also said that if you don't reduce the violence, that political solution becomes more and more difficult."

Miller refused to say where the U.S. and its NATO allies were in the withdrawal process.

He said his time as the head of the U.S.'s military mission in Afghanistan was coming to an end, without giving a date, though the press briefing had the feeling of a farewell.

Miller wouldn't speculate on the legacy of America's longest war, saying it will be for history to decide.

"The future will tell the rest of the story," he said. "What we will have to do is make an honest assessment of what went well and what didn't go so well over the years as we work forward."

------

Associated Press writer Aamer Madhani in Washington contributed.