Polling stations in Afghanistan have closed after a heavy turnout for Saturday's historic presidential election.
The turnout was so high for the country's first democratic transfer of power that some polling stations ran out of ballots.
Security was tight across the nation because Taliban militants promised to disrupt Saturday's vote, but the voting seemed to be relatively free of violence.
The special U.N. representative to Afghanistan, Jan Kubis, praised Afghan voters for the turnout "despite the threats and intimidations" they had received from insurgents.
The election was seen as pivotal for Afghanistan's political and economic future, as well as a test of wills between the Afghan people and the Taliban.
There were three frontrunners among eight presidential candidates: Ashraf Ghani, a former finance minister and World Bank official; former foreign minister Zalmai Rassoul; and Abdullah Abdullah, also a former foreign minister.
Some 450 provincial government seats also were at stake.
President Hamid Karzai, who has been in power since the fall of the Taliban in 2001, was constitutionally barred from running for a third term.
Preliminary results are expected later this month, and a final tally is due May 14. A second round of voting will be needed if none of the eight candidates receive more than half the vote.
The lead-up to the election was fraught with violence. Taliban militants had threatened to kill anyone participating in the ballot and had already carried out a number of bomb and gun attacks.
Afghan officials say they deployed hundreds of thousands of security forces to protect the country's 12 million eligible voters.
Neighboring Pakistan closed all border crossings with Afghanistan and deployed additional troops in an attempt to help Afghanistan conduct the election peacefully. Pakistan said border security arrangements were stepped up in close coordination with Afghan security forces.