Afghan and Western leaders have praised the turnout in Afghanistan's presidential election, describing the vote as a success.
In the vote for the first democratic transfer of presidential power in the country's turbulent history, turnout was estimated to be about 58 percent.
The Interior Ministry said 20 people were killed in violence across the country on election day.
Departing president Hamid Karzai, barred by the constitution from seeking a third term, praised voters for turning out in their millions in defiance of threats by the Taliban.
"Despite the cold and rainy weather and possible terrorist attack, our sisters and brothers nationwide took in this election and their participation is a step forward and it is a success for Afghanistan," he said after polls had closed.
US President Barack Obama commended Afghan people, security forces, and elections officials on the turnout. The sentiment was echoed by UK Foreign Secretary William Hague who hailed the achievement of the Afghan people.
More than seven million Afghans out of an estimated 12 million eligible voted in the poll, the country's electoral commission said.
But there were reports of ballot paper shortages and sporadic violence from across the country.
NATO chief Anders Fogh Rasmussen said the elections were "a historic moment for Afghanistan". The military alliance has co-ordinated much of the work of foreign forces in Afghanistan - most of them US and British troops - in a mission that will end this year.
Although there are eight candidates for president, only three are considered frontrunners - former foreign ministers Abdullah Abdullah and Zalmai Rassoul, and former Finance Minister Ashraf Ghani Ahmadzai.
None is expected to secure more than the 50% of the vote needed to be the outright winner, which means there is likely to be a second round run-off on 28 May.