Obaidullah Baheer is a lecturer at the American University of Afghanistan.

On Aug. 31 in Kabul, the Taliban celebrated the departure of the last U.S. troops by firing into the night, starting its self-proclaimed era of peace with gunfire. It was yet another sign of the harsh reality that the Taliban has won. Most Afghans would have preferred that it not come at the cost of the disintegration of the political institutions or the military apparatus, but the hostilities have stopped for now. The United States and its allies pledged to keep evacuating Afghans who fear Taliban retribution, yet Afghans are very apprehensive as to whether the Taliban will truly facilitate such an exodus.

So what can the international community do for the Afghans who stay back, willingly or unwillingly?

The international community will have to maintain a very delicate balance with the Taliban if it hopes to achieve any positives for remaining Afghans. Though there are real concerns of a potential worsening in Taliban behavior post-foreign withdrawal, the incentive of continued international legitimacy could act as a deterrent. Most political analysts mistakenly view the leverages the United States and its allies have over the Taliban as absolute. The truth is, international legitimacy can be revoked, sanctions can be reinforced and foreign aid can be cut off if the Taliban refuses to comply with international norms.

Secretary of State Antony Blinken has vowed to defend the rights of Afghans. This would require the United States to maintain, at bare minimum, frail relations with the Taliban. The total victory achieved by the Taliban grants it a commanding position in negotiating the future of Afghanistan, meaning that Afghan citizens and the international community would have to accept unfavorable conditions to negotiate access for minorities and women to education and work. Still, such participation and room for civil society to function, albeit in a limited capacity, would be a win for now — and leave room for hope in the future.

But if the international community does not proceed with caution, the Taliban could be pushed to the point that any incentives become meaningless to it, as in the 1990s when the Taliban chose to not compromise on its ideals despite isolation.

Isolation can be an effective deterrent only if the United States and its allies ensure the Taliban doesn’t have alternative options to turn to for recognition. China and Russia are two likely options. The United States and its allies would have to produce a consensus with regard to what the international community will condition its recognition of the Taliban state on, and ensure a uniform reaction if such conditions are violated. The option of isolation should thus be conditioned on realistic expectations that are mindful of the Taliban’s position of power.

The cases of Saudi Arabia and Iran are examples of how the need for economic prosperity and pressure from civil societies can create a path to incremental change in even the most autocratic states. Saudi Arabia has granted some civil liberties to its female population, including facilitating women seeking employment, revoking driving bans and partially abolishing the male-guardian requirement for traveling women. This was all done as it attempted to diversify the economy.

And during its Green Movement demonstrations of 2009, Iran saw its largest protests since the revolution. Since then, the population has used nonviolent resistance to demand rights. Despite continued crackdowns from authorities, the attention of the international community and its leadership’s aspiration for sanctions relief occasionally force the regime to show some tolerance for dissent in ways that would have been unimaginable in Iran decades ago. Though prospects of a major social revolution in Iran seem bleak, it is likely that the theocracy will have to negotiate a revision of laws concerning liberties with its more moderate parties and civil societies in the future — and the very presence of these parties and organizations in Iran shows the importance of allowing these groups space to operate and grow for the long term.

I realize I’m tying my hope to cases that have evolved over decades and have a great deal of room for further improvement, but the advent of mass communication and globalization should accelerate such a process in Afghanistan. Moderate and educated Afghans, with the support of conditioned aid from the United States and its allies, could create enough space to survive this transition. The compromises made now can be corrected in the future.

Yet the balance that must be struck now is extremely sensitive. If Afghans compromise too much in believing the Taliban’s excuses, or the United States and its allies make their expectations of the Taliban too idealistic, an emboldened Taliban would drive the country toward dark days. The price of a failing and isolated Afghanistan will be paid by common Afghans.