The Taliban moved to consolidate control over Afghanistan on Thursday, with the group's fighters advancing against a final pocket of armed resistance and its leaders preparing to announce a new government.
More than two weeks after the Islamic militants seized control of the Afghan capital and days after the United States completed its withdrawal, the Taliban were meeting to finalize the details of their new regime.
It will face formidable economic and security challenges after a chaotic end to a two-decade conflict.
The country's economy is on the brink of collapse, and there are no guarantees the international community will grant aid to a Taliban government. In a bid to boost its standing in the eyes of the world, the group has sought to allay fears the country will become a hub for terror and instability.
But persistent reports of repression and last week's suicide attack by the Islamic State Khorasan, or ISIS-K, terror group, have undermined those efforts, while resistance from a guerilla stronghold north of Kabul has also posed a threat to Taliban control.
Download the NBC News app for breaking news and politics
The Taliban said Thursday their fighters had launched an operation to take the Panjshir Valley, one of the last pockets of the country not in the militant group's hands, after negotiations failed.
The area has long been a bastion of resistance in Afghanistan. Local fighters held back the Soviets in the 1980s and the Taliban a decade later under the leadership of Ahmad Shah Massoud, a storied guerrilla fighter killed in a suicide bombing who remains widely admired in Afghanistan.
His son, Ahmad Massoud, and several former government officials are now attempting to establish a resistance movement in the same guerrilla heartland.
Fahim Dashti, a spokesman for the National Resistance Forces, a group loyal to Massoud, said in a video message shared with NBC News and other outlets Wednesday night that the Taliban had launched an offensive in the previous 40 hours.
“They did not succeed in their offensive and they did not advance even a kilometer,” Dashti said.
Taliban spokesman Zabihullah Mujahid told NBC News on Thursday that Taliban fighters had entered Panjshir and captured 11 “important” positions, including the area's main valley and the main road between Panjshir and Badakhshan.
Each side said it had inflicted heavy casualties, though NBC News was not able to verify the claims of either warring party.
Believed to be among the rebels is Amrullah Saleh, who served as vice president in the U.S.-backed government that was toppled by the Taliban blitz across the country. He has claimed to be the country's caretaker president after former leader Ashraf Ghani fled Afghanistan as Kabul fell Aug. 15.
“The Panjshir headquartered resistance isn’t for Panjshir but for the whole country,” a Twitter account associated with Saleh tweeted Monday. “The Afghan national flag is in full mast and hoisted in govt buildings. Our resistance is for rights and value.”
The country's new rulers were simultaneously gearing up to unveil their government.
The Taliban are widely expected to name Mullah Haibatullah Akhundzada, the militant group's supreme leader, to be the country’s highest authority. He is not expected to play a direct role in the government but to supervise and serve as head of state.
Though they have long sought to present themselves as a government-in-waiting, the Taliban have so far been tight-lipped about how their regime will work, repeating only vague assertions that the country will be governed by the Shariah, or Islamic law.
Though the Taliban have declared a general amnesty, thousands of Afghans have still sought to flee the country — fearing reprisals or simply afraid that the group will reimpose its strict interpretation of Islam.
The Taliban have promised safe passage out of the country for anyone left behind by the huge international airlift, but Kabul airport has been closed since the last U.S. flight left Monday.
The Taliban have also urged people to stay, as they face the task of rebuilding a desperately poor and war-weary nation.
Over half the population lives below the poverty line and 14 million people are food insecure, including 550,000 who have been displaced by the conflict since the beginning of the year, according to the United Nations’ World Food Program.
For two decades, this country of 38 million people has survived on billions of dollars in foreign aid, money that is now in question. The international community is looking to the Taliban to prove that they have changed their ways as well as their messaging.