Millions of Afghans went to the polls today, defying Taliban threats of violence and sporadic attacks across the country to choose a president in the midst of a worsening war.
"The Afghan people dared rockets, bombs and intimidation and came out to vote," President Hamid Karzai told a news conference after polls closed.
"We'll see what the turnout was. But they came out to vote. That's great, that's great."
Two Taliban fighters were killed in a gunbattle in the capital and rockets fell on several towns, mainly in the south and east, but violence tapered off during the day. Mr Karzai said in all there were 73 attacks in 15 of the country's 34 provinces.
"Overall, the security situation has been better than we feared. That is certainly the most positive aspect of these elections," said Kai Eide, head of the UN mission in Kabul.
"The security situation has, in general, allowed people to take part in the elections," he said.
Pre-election polls showed Karzai, in power since 2001, is likely to win but not by enough to avoid a run-off against his main challenger, his former foreign minister Abdullah Abdullah, who ran a surprisingly energetic campaign.
The election is in large measure a referendum on Karzai, a master coalition builder who is personally liked by most Afghans but also widely blamed for running a government that is corrupt, ineffective and entirely dependent on international aid.
The president relied for votes on the endorsements of many of the country's notorious former militia chiefs, raising alarm among his Western backers that the cost of a victory in the election could be a return of warlords to power.
The election was also a test for US President Barack Obama, who has ordered a massive troop build-up this year as part of a strategy to reverse Taliban gains.
Mr Obama's envoy for the region, Richard Holbrooke, toured polling stations in Kabul and said the voting he'd seen was "open and honest". Mr Holbrooke said: "So far every prediction of disaster turned out to be wrong."
Preliminary results are not due for two weeks, although polling stations could begin to report sooner. A run-off, if needed, would be held in early October.
Taliban militants had repeatedly vowed to disrupt the poll, but they failed to mount a single large-scale attack.
Many Afghans said they were not intimidated.
Still, questions remain over turnout in the south, the most violent part of the country and the site of many of the polling day attacks. Mr Karzai draws much of his own support in the south, and low turn-out there could increase the chance of a run-off.
UN officials described turnout as robust in the north but weaker in the south, although they saw signs that turnout there picked up there during the day as violence tapered off.
Reuters