Taliban fighters advanced deep into the last holdout province of Panjshir Sunday, as the top US general warned Afghanistan faces a wider civil war that would offer fertile ground for a resurgence of terrorism.

Following their lightning-fast rout of Afghanistan's army last month -- and celebrations Monday when the last US troops flew out after 20 years of war -- the Taliban are seeking to crush resistance forces defending the mountainous Panjshir Valley.

The Taliban are yet to finalise their new regime after rolling into Kabul three weeks ago at a speed that analysts say likely surprised even the hardline Islamists themselves.

The Panjshir Valley is the last major pocket of resistance in Afghanistan against the Taliban
The Panjshir Valley is the last major pocket of resistance in Afghanistan against the Taliban AFP / Ahmad SAHEL ARMAN

But top US General Mark Milley questioned whether they can consolidate power as they seek to shift from a guerrilla force to government.

"I think there's at least a very good probability of a broader civil war," said Milley, chairman of the Joint Chiefs of Staff, in a bleak assessment.

"That will then in turn lead to conditions that could, in fact, lead to a reconstitution of Al-Qaeda or a growth of ISIS (Islamic State group)," he told Fox News Saturday.

3D map of the remote Panjshir Valley in Afghanistan, which held out for a decade against the Soviet Union's occupation and also the Taliban's first rule from 1996-2001.
3D map of the remote Panjshir Valley in Afghanistan, which held out for a decade against the Soviet Union's occupation and also the Taliban's first rule from 1996-2001. AFP / Patricio ARANA

Afghanistan's new rulers have pledged to be more accommodating than during their first stint in power, which also came after years of conflict -- first the Soviet invasion of 1979, and then a bloody civil war.

They have promised a more "inclusive" government that represents Afghanistan's complex ethnic makeup -- though women are unlikely to be included at the top levels.

However, this time women will be allowed to attend university as long as classes are segregated by sex or at least divided by a curtain, the Taliban's education authority said in a lengthy document issued on Sunday.

The Taliban, who rolled into Kabul three weeks ago at a speed that analysts say likely surprised even the hardline Islamists themselves, are yet to finalise their new regime
The Taliban, who rolled into Kabul three weeks ago at a speed that analysts say likely surprised even the hardline Islamists themselves, are yet to finalise their new regime AFP / Aamir QURESHI

Female students must also wear an abaya (robe) and niqab (face-veil), as opposed to the even more conservative burqa mandatory under the previous Taliban regime.

Few in Panjshir, a rugged valley north of Kabul that held out for nearly a decade against the Soviet Union's occupation and also the Taliban's first rule from 1996-2001, seem to trust their promises.

Taliban official Bilal Karimi on Sunday reported heavy clashes in Panjshir, and while resistance fighters insist they have the Islamists at bay, analysts warned they are struggling.

Merkel says talks with Taliban must continue
Merkel says talks with Taliban must continue GERMAN POOL

The Italian aid agency Emergency said Taliban forces had reached the Panjshir village of Anabah, where they run a surgical centre.

"Many people have fled from local villages in recent days," Emergency said in a statement Saturday, adding it was continuing to provide medical services and treating a "small number of wounded".

Anabah lies some 25 kilometres (15 miles) north inside the 115-kilometre-long valley, but unconfirmed reports suggested the Taliban had seized other areas too.

3D map of the remote Panjshir Valley in Afghanistan, which held out for a decade against the Soviet Union's occupation and also the Taliban's first rule from 1996-2001.
3D map of the remote Panjshir Valley in Afghanistan, which held out for a decade against the Soviet Union's occupation and also the Taliban's first rule from 1996-2001. AFP / Patricio ARANA

Bill Roggio, managing editor of the US-based Long War Journal, said Sunday that while there was still a "fog of war" -- with unconfirmed reports the Taliban had captured multiple districts -- "it looks bad".

Both sides claim to have inflicted heavy losses on the other.

Roggio also noted that the Taliban had seized "a massive amount of weapons" after the US withdrawal and collapse of the army.

Former vice-president Amrullah Saleh, who is holed out in Panjshir alongside Ahmad Massoud -- the son of legendary anti-Taliban commander Ahmad Shah Massoud -- warned of a grim situation.

Saleh in a statement spoke of a "large-scale humanitarian crisis", with thousands "displaced by the Taliban onslaught".

The Panjshir Valley, surrounded by jagged snow-capped peaks, offers a natural defensive advantage, with fighters melting away in the face of advancing forces, then launching ambushes firing from the high tops down into the valley.

The United States invaded Afghanistan and toppled the first Taliban regime in 2001 in the wake of the 9/11 attacks by Al-Qaeda, which had taken sanctuary in the country.

The international community is coming to terms with the new Taliban regime with a flurry of diplomacy.

US Secretary of State Antony Blinken is due Monday in Qatar, a key player in the Afghan saga and the location of the Taliban's political office, though he is not expected to meet with the militants.

He will then travel to Germany to lead a virtual 20-nation ministerial meeting on Afghanistan alongside German Foreign Minister Heiko Maas.

German Chancellor Angela Merkel on Sunday called for dialogue with the Taliban.

"We simply have to talk to the Taliban about how we can get people who have worked for Germany out of the country and bring them to safety," she told reporters.

UN Secretary-General Antonio Guterres, meanwhile, has called for an end to the violence over fears of a new civil war.

The UN's humanitarian chief Martin Griffiths was in Kabul on Sunday for several days of meetings with Taliban leadership, with a UN spokesman saying the group committed to cooperating with the humanitarian community.

"The authorities pledged that the safety and security of humanitarian staff, and humanitarian access to people in need, will be guaranteed and that humanitarian workers -- both men and women -- will be guaranteed freedom of movement," Stephane Dujarric said.