Afghanistan has been back from disaster many times before
Afghanistan has made strides in many spheres over the past eight years despite its problems, writes the BBC's M Ilyas Khan after a recent journey through the country to cover elections.
From the Communist takeover of 1978 to the destruction of Kabul in 1992 and its subsequent fall to the Taliban in 1996, Afghanistan has been back from the brink many times before.
There is no reason why it should be different this time.
I was in Kabul in March 2001 when the Taliban blew up the two 2nd Century Buddha statues carved into a mountainside in central Bamyan province.
I remember the gloom, and even despair, it caused among some of the Taliban's own mid-ranking officials.
I thought things had slid past the point of no return.
But then came hope, disguised as an ostensibly unpopular decision of the United States to attack the country and expel the Taliban.
Flicker of hope
The move promised democracy, economic uplift and an end to war, objectives which the Afghans largely supported.
I saw a flicker of that hope in June 2002 when delegates of the emergency Loya Jirga, or the grand tribal assembly, gathered in Kabul and endorsed Hamid Karzai as the interim leader of the post-Taliban Afghanistan.
Mr Karzai's subsequent success in the 2004 presidential elections showed that the Afghan people saw him as a unifying figure and not simply an "American stooge" as he was branded by some elements in neighbouring Pakistan.
I remember the tribes in eastern Afghanistan raising armed volunteers to prevent Taliban insurgents, based in sanctuaries in the Pakistani border areas, from disrupting the elections.
Warlords have helped eliminate poppy crops in Badakhshan
And they were successful, unlike the elections last month when the Taliban launched hundreds of attacks during before and during the elections, causing many voters across the south and east to stay indoors.
Obviously, Afghanistan is once again teetering on the edge, with doomsday messages emanating from both friends and foes.
Afghans cite two broad reasons for this state of affairs.
First, they believe the US's 2003 decision to extend their "war on terror" to Iraq put the pro-Taliban forces in Pakistan on a long leash and led to the creation of extended militant sanctuaries there.
This also diluted the initial fervour of the international community to help boost Afghanistan's reconstruction and economy.
Second, many Afghans feel that the policy of co-opting former warlords into the government has undermined not only its moral standing but also its ability to fight corruption.
The war against the militants has gone badly, causing civilian casualties and more attacks by the Taliban which have also killed and injured civilians.
And there are no adequate means of livelihood for many Afghans.
Understandably, the people find themselves caught between a rock and a hard place.
In spite of this, they have shown through last month's presidential elections that they consider the post-Taliban system a lesser evil.
That is why they turned out in considerable numbers to vote despite threats from the Taliban.
There are obvious reasons for this too.
The eight years of Karzai rule have brought unprecedented growth in business, communications, industry and infrastructure.
At the turn of the millenium, many people in remote Badakhshan province still did not know whether they were citizens of Afghanistan or Tajikistan.
'The mantle of leadership will soon pass to a new generation of Afghans'
Today, multi-storey shopping malls are being built there, as well as roads linking this isolated region with Kabul.
In Herat, industrialisation has taken root and a vibrant entrepreneurial class is on the rise.
The south has lagged behind due to its proximity to Taliban sanctuaries across the border, but it still provides the national leadership and much of its physical infrastructure has been restored.
And even the warlords may have served a useful purpose, somehow.
In Badakhshan, they were instrumental in eradicating poppy crops.
In Kabul, the warlords dislodged from their fiefdoms in the north, west and south of the country have started television channels, airlines and other businesses that provide badly-needed employment for the country's youth.
The Karzai government's policy of giving these warlords government jobs in Kabul instead of gubernatorial offices in their regions seems to have paid off in political terms as well.
While they still have residual influence in their respective regions, the voting patterns show their grip on local loyalties is weakening.
Many believe that if the democratic process holds, the mantle of leadership will soon pass to a new generation of Afghans who are looking for more prosperity at home and greater acceptability abroad.