Election officials in Afghanistan are still counting votes, but say President Hamid Karzai is moving closer to the 50% threshold which would represent victory. But they also have more than 2,000 claims of fraud to investigate. The BBC's Chris Morris in Kabul says the outcome will be critical for Afghanistan.
Uncertainty over the future surrounds many in Afghanistan
On a hill overlooking Kabul, where the mountains of the Hindu Kush loom in the distance, there is a terraced rose garden.
It is a place of peace in a country still struggling with conflict.
In the late afternoon sun, people come up here to get out of the dusty city centre, to sit and watch the rooftops below, or perhaps to fly a kite.
It is a good place to get a sense of perspective, a commodity which can be hard to come by here.
In some quarters, there is mounting panic about last month's presidential election for which the votes are still being counted.
Allegations of massive state-sponsored fraud have led to talk of a crisis of legitimacy.
Dark rumours swirl about what could happen next, and Afghans are watching nervously, along with many people in the corridors of power in Washington, London and beyond.
Way of life
I had gone to the rose garden for a bit of privacy.
I wanted to meet a man from the provinces, who had driven more than three hours to get here, to tell me about election fraud in his district.
Mohammed, not his real name, is 46, from Paktia province near Afghanistan's troubled border with Pakistan.
He has a neatly trimmed beard, a baggy Afghan hat, and a blue pen in his shirt pocket.
As a local tribal elder he was observing inside a polling station on election day.
Every so often, he said, men with influence would show up. Ballots were stuffed into boxes.
"One of them came with the ballots of 250 women and said all of them wanted to vote for the president," Mohammed told me.
"There wasn't really anything I could do about it except watch."
"Less than 3% of the women showed up in our district, but far more votes were recorded," he said.
"Were you surprised by the level of fraud?" I asked.
He laughed. "After 30 years of war, fraud has become a way of life," he said.
"People in our district treated it as a big show, a soap opera.
"But if the president wins again
well, we can't accept it."
Mohammed comes from a region where many of the people used to favour or even fight for the Taliban, in the civil war against the Northern Alliance.
Abdullah Abdullah, the main challenger in this election, was a senior figure in the enemy camp.
In other words, in Mohammed's district at least, the president's men were rigging an election he would have won anyway. It just got a little out of hand.
"A lot of people are serving the king's will without the king being aware of it," is the way Ashraf Ghani puts it.
He used to be the president's closest adviser, but now he has lost faith.
"What they're doing is destroying the trust of the people," he added.
And what of Hamid Karzai, the man at the centre of the storm?
Despite Karzai's reforms, many Afghans are impatient for change
He was once described as the darling of the West, the man who embodied the hope of the new democratic Afghanistan, cutting a dashing figure in his traditional Afghan cape and karakul hat.
But the love affair has soured, and the Obama administration has been notably more critical.
The Americans were particularly disappointed when deals were done with a variety of Afghan warlords - including the notorious Uzbek strongman General Dostum - to try to ensure his re-election.
So Mr Karzai is hunkered down in his presidential palace, stuck between the often competing demands of foreigners and Afghans, of different tribes and ethnic groups.
His campaign managers rightly point out that they are not the only ones being accused of fraud. Many nominees have been at it.
But the state machinery seems to be more effective than anyone else's. And for countries that have sent their troops to fight and die here, that is a problem.
It can be easy to forget how much this place has changed under President Karzai's rule.
Eight years ago the Taliban ran a pre-modern theocratic state, and leaders of al-Qaeda had an unchallenged safe haven.
Corruption is still a scourge, the Taliban's renewed insurgency is menacing, and people are tired of waiting for better times
Now there are independent media, girls are going to school, and an elected parliament sits in Kabul.
But corruption is still a scourge, the Taliban's renewed insurgency is menacing, and people are tired of waiting for better times.
And from the rose garden, where they sit and stare at the horizon beyond Kabul, many of them fear further trouble ahead.
It does not have to happen. This could just be a blip.
But the outcome of this election will be a defining moment for Mr Karzai, for Afghanistan, and for the international involvement in this most complex of countries.
How to listen to: From our own Correspondent
Radio 4: Saturdays, 1130. Second weekly edition on Thursdays, 1100 (some weeks only)
World Service: See programme schedules
Story by story at the