Violent opposition to Afghanistan's April 5 election aside, the true democratic challenge will begin after the poll.
Afghanistan's President Hamid Karzai was last in South Africa in December, when he attended the state funeral of former president Nelson Mandela. But one phrase that the United Nation's second most senior diplomat in Afghanistan hears often when speaking to Afghans is that "our problem is that we have no Mandela".
Nicholas (Fink) Haysom perhaps knows better than most what they mean. The burly South African, who hails from Durban, was Nelson Mandela's legal adviser back in 1994. Now he's a leading figure at the UN Afghanistan Mission in the capital Kabul, monitoring events closely as the country heads for historic elections on April 5.
Karzai has served two terms and is legally obliged to step down this year. The polls will mark the first transfer of power since the Taliban government fell in 2001 in a country ravaged by three decades of war.
Despite a trillion dollars in international assistance over more than a decade, tens of thousands of United States and Nato troops, and thousands of dead – most of them civilians – the Taliban are still able to kill and wound in deadly suicide attacks.
The Islamist fighters may have been repelled to the extent that they have not been able to seize and hold on to new territory, as they did in the past, but they still wield considerable influence, especially in parts of the south and east of Afghanistan, close to the border with Pakistan.
The holy warriors have threatened to “use all force” to disrupt the poll, according to their spokesperson, Zabihullah Mujahid, but most of their recent focus has been on the capital Kabul. Offices of the Independent Electoral Commission have twice come under attack, and a deadly ambush on an international hotel recently is another potent sign of how they have been fighting to be heard in recent weeks.
Yet Interior Minister Mohammad Umer Daudzai remains adamant the elections won't be sabotaged.
"I'm sure they [the Taliban] will fail," he said confidently, adding that "comprehensive measures" to bolster security had been put in place in collaboration with US and Nato troops. Yet since June, it has been Afghanistan's own fledgling security forces that have been in charge of making the country safe.
An hour after I leave the minister's office, a suicide bomber detonates a bomb outside the building, killing six policemen. Bombings are now an almost daily occurrence in the capital, where blast walls have replaced gardens and men hurriedly filling sandbags have become a familiar sight this past week.
Yet the queues of voters eager to register at the last minute suggests defiance in the face of violent attacks. "It is important that we make our voice heard," said law student Mina Dalil, "especially as we are women. This is about our future."
Opinion polls suggest three front-runners will dominate the presidential race. Abdullah Abdullah came second during the elections in 2009, and now worries about what he calls "industrial-scale fraud".
Ashraf Ghani, a former World Bank official and former adviser to Karzai, is also expected to be a popular choice, along with former foreign minister Zalmai Rassoul, who is believed to have Karzai's backing.
The men are all individuals the international community says it can work with, but none is expected to win the first round outright. These are elections in which ethnicity, politics and geography are expected to influence how 12-million registered voters will vote.
The first task for the country's new leader will be to sign the stalled bilateral security agreement with the US, which will give legal authority to enable about 10 000 US troops to remain in Afghanistan beyond the end of this year.
That's expected to happen just as tens of thousands of other foreign forces prepare to go home, leaving the task of security to 350 000 Afghan army and police.
The new president would also have to address the issue of mining, said Javed Noorani of Afghan nongovernmental organisation Integrity Watch. The country's ministers estimate the value of mineral deposits at about $3-trillion. But it's considered an inflated estimate when the challenges and costs of extracting this mineral wealth are taken into account. Gold, silver and copper are among the precious metals that offer much promise in terms of tax revenue – three-quarters of Afghanistan's total budget comes from foreign aid.
Yet insecurity and rampant corruption hamper efforts to develop industrial-scale mining and 30 years of civil war have robbed the country of its infrastructure.
Mines have become "vote banks" for influential supporters of some of the candidates, claims Noorani, who said contracts had been awarded "illegally" in return for delivering votes. So the minerals, for the most part, remain firmly in the ground and without "peace and stability", admitted Haysom, it would be hard for economic development to take root in Afghanistan.
Landlocked and still burdened by the illegal opium trade that fuels the insurgency, nurtures corruption and lands up as heroin on South Africa's streets, Afghanistan still has the image of a lawless country which once harboured terrorists such as Osama bin Laden.
But things are changing – slowly. Girls are returning to school in the cities, and in parts of the north large construction projects are taking place. So, the election will be a test of resilience and commitment to the modest progress made in the past decade, in particular for a younger generation whose grandparents fought the Russians and then the Taliban less than a decade later.
Afghanistan is a country defined by its complex history that is increasingly being forced to stand on its own two feet as foreign forces prepare to go home, a country where, just like in South Africa, Haysom declares there's still much work to be done, and "the past wrestles with the future".
Karen Allen is a BBC foreign correspondent covering Africa and Afghanistan