AHMAD MASOUD has spent years stockpiling weapons; he had a feeling this day might come. Mr Masoud leads a group of armed rebels from Panjshir, a tiny mountainous province 70km (45 miles) north of Kabul, Afghanistan’s capital, that has never succumbed to invaders. It is, for now, the only part of the country not under Taliban control. But the jihadists are on their way. If they come without weapons, he says, they may enter to negotiate peace. But if they arrive with guns they will meet resistance. Reports in recent days of fighting suggest their choice is made.

The Economist Today

Hand-picked stories, in your inbox

A daily email with the best of our journalism

Mr Masoud bears a striking resemblance to his father, Ahmad Shah Masoud, who is revered in Afghanistan as a revolutionary hero. The elder Masoud was a Francophile who was educated in the lycée in Kabul. He later became famous as an ethnic Tajik mujahideen commander who fought the Soviets in the 1980s and the Taliban in the 1990s. In April 2001 he travelled to Strasbourg to warn the European Parliament that Osama bin Laden might use Afghanistan as a base for terror. Then, two days before the 9/11 attacks, he was bombed by al-Qaeda, and died of his wounds a short while afterwards. The killing was said to have been a gift from bin Laden to the Taliban and an action which gained the perpetrator protection .

Ahmad Masoud, the son, was born in Afghanistan in 1989, the year the Soviets withdrew. He was educated in Iran and in Britain, where he spent a year at the Sandhurst officer-training academy and earned degrees in war studies and international politics in London. His vision for Afghanistan is modeled on Switzerland, a decentralised country with regional autonomy for ethnic groups.

The populations of Panjshir and its neighbouring provinces are dominated by ethnic Tajiks while the Taliban are predominantly Pashtuns. As the Taliban swept across Afghanistan in recent months they made sure to take the less welcoming northern provincial capitals first in order to minimise any resistance. But their earlier-than-planned capture of Kabul has left them stretched. Returning to Panjshir will make them even more so. Panjshir’s long oval valley can only be entered through a steep gorge. Its towns, spread along the valley floor surrounding the Panjshir river, are swelling with refugees. Their number includes members of persecuted ethnic groups, such as the Hazaras. Soldiers from Afghanistan’s armed forces are also gathering in response to Mr Masoud’s call to arms.

The region harbours what remains of Afghanistan’s government, too. President Ashraf Ghani fled Afghanistan when the Taliban arrived but his Tajik Panjshiri vice-president, Amrullah Saleh, came home again. On August 23rd he used Twitter to proclaim himself the country’s caretaker president. Mr Saleh and Mr Masoud together control the National Resistance Front of Afghanistan, the opposition group made up of soldiers and militia members that wants to defend Panjshir from Taliban rule. Its fighters have been seen with the flag of Afghanistan and that of the Northern Alliance, also known as the United Islamic Front for the Salvation of Afghanistan, a collection of anti-Taliban militia once commanded by Mr Masoud’s father. Panjshir is surrounded and the Taliban is well supplied with weapons abandoned by the Afghan armed forces. Mr Masoud knows that his own store of arms will not last long. On August 21st he appealed for international help. America and its allies want to leave Afghanistan and will be unlikely to provide any assistance while the Taliban co-operates with their evacuations.