Tight security ensured Afghanistan's presidential election was held on Saturday in relative calm, though several small attacks, low turnout and complaints about the voting system heightened fears an unclear result could drive the country into further chaos.
Preliminary results are not expected before Oct 17 and final results not until Nov 7. If no candidate gets 51% of the vote, a second round will be held between the two leading candidates.
Taliban fighters attacked several polling stations across the country to try to derail the process, but intense security prevented the large-scale violence of previous polls.
"This election was the healthiest and fairest election in comparison to the previous elections," said Hawa Alam Nuristani, head of country's Independent Election Commission (IEC), after the voting concluded.
Ten of thousands of Afghans braved the threat of militant attacks and delays at polling booths to vote in the election, a major test of the Western-backed government's ability to protect democracy against Taliban attempts to derail it.
Two policeman and one civilian were killed in mostly small-scale Taliban attacks, the defence ministry said, adding 37 people were injured.
Tens of thousands of troops were deployed to try to protect voters and polling stations.
IEC officials did not immediately share the details on turnout, but Western diplomats in Kabul estimated it was low due to fears of violence and delays caused by polling officials.
Voting was extended by two hours, after technical problems delayed the opening of some polling stations around the country.
Independent election observers and activists said a slow pace to voting triggered confusion at some polling stations, with long queues forming outside.
"It took the first voter 31 minutes to vote. For subsequent voters it was taking around five minutes and then it started to streamline to 3 minutes and 30 seconds," said Nishank Motwani, an observer stationed in Kabul.
"Election commission staff looked panicked and voters were getting angry that the queue was not moving."
Some observers feared the Taliban had forced a partial shutdown to upset the final results as the IEC, without giving a reason, said it had failed to establish contact with 901 of the 4,942 polling centres.
The hardline Islamist group, which controls more of the country than at any time since its regime fell in 2001, had warned the more than nine million registered voters to stay at home or face dire consequences.
Saturday's presidential vote is the fourth since the Taliban was toppled.
Over a dozen candidates are vying for the presidency, led by incumbent Ashraf Ghani and his former deputy Abdullah Abdullah.
The winner will play a crucial role in the country's quest to end the war with the Taliban and any resumption of talks between the militant Islamist group and the United States, which were called off this month.
The Transparent Election Foundation of Afghanistan said early turnout was "very poor", in part due to the requirement for voters to be photographed, to which female voters in conservative areas objected.
Others were determined to vote.
"Bravado gets defined when one musters courage to cast one's vote," said Kabul doctor Roya Jahangir after casting her ballot. "We hope this time there is no fraud."
Hundreds of voters complained their names were missing from voters' lists or the biometric devices used to prevent fraud. Addressing those concerns, the IEC eased restrictions, allowing anyone with election stickers on their national identity cards to vote.
Polling Stations Attacked
The small-scale attacks included an explosion at a polling station in a mosque in the southern city of Kandahar which wounded 16 people, according to a security source.
In the northern province of Faryab, Afghan forces clashed with Taliban fighters in six districts, forcing people to stay indoors.
The Taliban said its fighters attacked polling stations in Laghman province, in eastern Afghanistan. Officials said four explosions in the eastern city of Jalalabad, in which one person was killed, disrupted voting at some stations.
Blasts also hit Kabul and Ghazni, officials said, while more than 400 polling centres remained closed because they were in areas under Taliban control.
Western diplomats said the scale of the militant group's attacks would determine whether talks with Washington resumed.
"Talks can only begin if the Taliban exercises restraint and allows people to vote," said one diplomat overseeing the elections.
Ghani cast his ballot in a Kabul high school, telling reporters: "I thank God that today that people's vote will help the republic of Afghanistan to move forward."
Abdullah voted at a different Kabul school. "The threats to innocent people do not show the strength of the Taliban," he said.
Both men came to power in 2014 after a bitterly contested election marred by fraud.
Afghanistan's political scene is still tainted by the aftermath of that vote, which forced the two main rival groupings to form an unstable partnership. Both sides were accused of massive electoral cheating.