Afghan policemen keep watch at a checkpoint in Kabul, Afghanistan on Saturday. — Reuters
Many Afghans said voting went smoothly, triumphantly holding up fingers stained in indelible ink to show they had cast a ballot, but several said they had experienced problems.
“I came this early morning to cast my ballot. Unfortunately my name was not on the list,” said Ziyarat Khan, a farmer in Nangarhar. “The whole process is messy like the last time.”
Campaigning was hampered by violence from the first day, when Ghani's running mate was targeted in a bomb-and-gun attack that left at least 20 dead.
Bloody attacks have continued to rock Afghanistan, including a Taliban bombing at a Ghani rally last week that killed at least 26 people in the central province of Parwan near Kabul.
The interior ministry said it had deployed 72,000 forces to help secure polling stations.
Election officials say this will be the cleanest election yet, with equipment such as biometric fingerprint readers and better training for poll workers to ensure the vote is fair.
Still, the US embassy in Kabul has said it is “disturbed by so many complaints about security, lack of an equal playing field and fraud”.
Saturday's poll was initially slated to take place in April, but was twice delayed because election workers were ill-prepared, and the US was leading a push to forge a withdrawal agreement with the Taliban.
That deal has been scuppered for now after US President Donald Trump pulled out, and Afghanistan's next president will likely face the daunting task of trying to strike a bargain with the Taliban.
Results are not expected until October 19. Candidates need more than 50 per cent of the vote to be declared the outright winner, or else the top two will head for a second round in November.
Pakistan extends congratulations
Pakistan congratulated the Afghanistan government and the people for successfully holding the 4th presidential elections "despite serious hurdles and challenges", a statement by the Foreign Office said.
"The people of Afghanistan particularly deserve appreciation for their clear decision to continue with the democratic course," said the statement.
Pakistan expressed hope that with the new government, the stalled peace process can be moved forward to bring an "Afghan-led and Afghan-owned negotiated political settlement" to the 18-year-old conflict in Afghanistan.
"Pakistan will continue to facilitate the new Afghan government towards this end," the Foreign Office said in its statement.
The statement also stressed that a "strong, independent, peaceful and prosperous Afghanistan" is key to regional peace and stability.