When provincial capitals fell one after another last week, surrendering to the Taliban and relinquishing the glittering mansions of the warlords who fled the country, it was clear to many that the battle for Afghanistan would soon be over. Contrary to predictions that the group's entry into Kabul would be bloody and violent, as in 1992, a negotiating team was instead sent into the presidential palace while Taliban fighters encircled the city. President Ashraf Ghani resigned his position and was allowed to leave the country escorted by the Americans. Rather than a bloody takeover, it was more like a peaceful transition of power.
Furthermore, the Taliban announced a general amnesty for "everyone", including those who worked with the ousted government and the NATO occupation forces.
The Taliban has fought for two decades to get to this stage. Its people come from all walks of Afghan life, although mainly rural, and have achieved victory on the battlefield, despite some areas such as Panjshir Valley holding out as a resistance base. Now, though, the movement has a new battle to fight in terms of governance and diplomacy.
The fact that arms were on show with those standing behind the group's leadership in the victory footage filmed in the presidential palace on 15 August unnerved many observers. In the new Afghanistan, the Taliban forces would be wise to put down their guns and assume the mantle of a responsible government.
That is the most difficult task for former insurgents. Commanders and fighters – both the eager young and the hardened veterans – often provide the greatest obstacle to leadership aspirations for a quiet and orderly transition and administration. Leaders in history who were aware of this have often felt compelled to remove by force or even kill the people who fought alongside them in the struggle.
The Taliban is not a stranger to governing, though. The movement had a taste of it in the late 1990s when it ruled most of Afghanistan. It now has to prove to the international community that this time will be markedly different.
The closure of girls' schools and restricted female employment opportunities; the brutal response to any hint of dissent; and discrimination against minorities such as the Shia Hazaras will all be amongst the things that the international community will not want to see again if the Taliban wants international recognition for its government.
And there may indeed be hope that change will happen. Taliban spokesman Suhail Shaheen has guaranteed that women will have every right to education and work, and the group has built up improved relations with the Hazaras and other ethnic minorities such as the Tajiks over the years, to the point that it has been recruiting them to its ranks. The movement is apparently no longer solely Pashtun in make-up.
Moreover, it maintains that the flurry of reports in Western media that girls are being forced to marry "militants" and are prevented from attending university or finding work have no grounding in reality. They are, it is claimed, based on individual allegations rather than dogmatic enforcement.
The process of international recognition has already begun. China, for example, offered to recognise the Taliban government if it took control of Kabul, and Russia is currently deciding whether it should do so or not. Pakistan has stated its willingness to work with any government ruling Afghanistan, and there are reports that Iran has been considering recognition for some time due to its improved relations with the group. Western nations, of course, are still holding out, with British Prime Minister Boris Johnson urging other nations not to recognise Taliban rule.
The Taliban leadership will also need to distance itself from "global jihadism". Predictions that the group's victory in Afghanistan could lead to Al-Shabaab's victory in Somalia or Daesh's resurgence in the Levant have emerged over the past few days and have probably been greatly overstated. They smack of scaremongering more than anything else.
There are also predictions that Taliban rule could once again grant Al-Qaeda a safe haven and breathing space from the war on terror, despite the likelihood that the Taliban will not take any chances in this respect and the fact that Al-Qaeda is a shadow of its former self. There are claims that it no longer exists, and is only kept alive by a few militant groups who once had links to it.
In this sense, the Taliban will have to reassure the international community that it is an Afghan national movement operating within its country's internationally-recognised borders, and which is unwilling to threaten the international order as transnational jihadist movements have done. If the US-led war on terror failed on many levels, it succeeded in battering ideological movements into conforming to that model. Even so, as Yvonne Ridley has said, "The Taliban is made up of Afghans with popular support in many parts of the country… These are people fighting in and for their own country, not interlopers." We must bear in mind, she added, "That the Taliban has never exported terrorism or carried out military strikes beyond its own country."
As for those who insist that the Taliban is an insurgent movement which cannot possibly cooperate with the international community, a quick look at history shows that militias and ideology-based movements have a tendency to become more moderate over time through their experience of governance and diplomacy. Look at China, Saudi Arabia and Israel, for example, all of which are countries with roots in violent ideologies which went on to dominate their politics and governments. Despite their poor human rights records, they have moderated themselves somewhat — although the Palestinians might disagree on this point — and have internationally-recognised governments.
That has also been the case with nations which won their independence after fighting against their former colonial rulers. Even the US fought a revolutionary war against Britain to drive out a colonial power and achieve self-rule.
As such, it isn't too difficult to envisage the Islamic Emirate of Afghanistan with a viable government in the coming weeks, months, and years. The only question is whether it will be isolated and marginalised like Iran, or embraced as part of the international community.
Farhan Hotak, a vlogger and journalist in Afghanistan who has been monitoring events, emphasised to me that the Taliban members are basically the very image of the rural Afghans, which are the majority in the country. "The people living in the outskirts of rural districts live the life of the Taliban," he said. "With no access to anything from the earliest days, they were pretty much always isolated."
Hotak said that the most important thing now is for the country to experience peace after almost five decades of conflict. He recalled the days – not very long ago – when "if by any chance you had a lightbulb or torch on [outside] you'd be attacked from the skies." He insisted that the "good thing is they [the people] can now walk out and work at night when they couldn't before."
The Taliban has a dark legacy hanging over its head, but the formation of its new government after its conquest in 2021 may present itself as a fresh start for the movement and its relations with the world. The group won legitimacy through armed struggle, now it must earn it through diplomacy.
The views expressed in this article belong to the author and do not necessarily reflect the editorial policy of Middle East Monitor.