People have voted in Afghanistan's presidential poll amid heavy security and bomb attacks from insurgents.
More than 70,000 security forces were deployed across the country to counter Taliban militants who have vowed to target polling stations.
The twice-delayed vote is taking place after Taliban-US peace talks collapsed earlier this month.
The two main candidates are the incumbent, Ashraf Ghani, and chief executive, Abdullah Abdullah.
They have shared power since 2014 in a unity government.
Polls closed at 17:00 (12:30 GMT). At least one person has been killed and 27 others wounded in bomb and mortar attacks on voting centres.
But in the southern city of Kandahar, women were seen standing in queues to vote, despite a bomb attack on a polling station.
Women voters make up 35% of the more than nine million Afghans registered to vote.
The Independent Election Commission of Afghanistan expects to announce the results in three weeks.
Turnout is expected to be low, but one voter said she would cast her vote even if it meant standing in long queues for hours.
"Bravery is defined when one musters the courage to cast their vote in Afghanistan," said Roya Jahangir, a doctor based in the capital, Kabul.
"We hope this time there is no fraud - otherwise voters will feel cheated once again," she told Reuters news agency.
Authorities extended voting hours to ensure those queuing would have a chance to cast their ballot.
Why does this election matter?
Afghanistan's next president will lead a country devastated by four decades of war. The conflict continues to kill thousands of people every year, drawing in forces from around the world.
Nearly two decades since the international community intervened, the US has been trying to negotiate an end to the conflict with the Taliban.
The US currently has about 14,000 troops in Afghanistan, and there are thousands more from countries part of a Nato mission to train, advise and assist the country's security forces.
Whoever is elected president in the fourth election since US-led troops ousted the Taliban in 2001 should have a key role to play.
However, the Taliban currently refuse to negotiate directly with the Afghan government, saying it is illegitimate. They say they will only talk to Afghan authorities after a deal with the US is agreed.
Who sits at the head of Afghanistan's government matters to the people caught in the crossfire between the army, the Taliban and other insurgents.
What are the other issues?
Five years ago, the presidential election was mired by allegations of fraud and vote-rigging. It took months to reach a result, with a deal between the two main contenders negotiated by the US ending in a "national unity government".
Hopes are not high that things will be better this time.
Out of a population of about 37 million, fewer than 10 million are registered to vote - and even fewer are expected to cast a ballot. A poll carried out by the Transparent Election Foundation of Afghanistan found more than half of respondents were not planning to vote.
This is in part due to threats of violence from the Taliban, who have said they will attack polling booths and have already targeted election rallies.
There are also large areas of the country under Taliban control, where the Kabul government has little to no power, and voting is all but impossible.
But a perceived lack of enthusiasm among voters is also attributed to a feeling things may not change for the better - not helped by the fact the same two men who fought for months over the top job in 2014 are the front-runners once again.
Both have been accused of corruption while in office. Meanwhile, unemployment stands at about 25%, according to the UN, and almost 55% of Afghans are living below the poverty line.
Who are the contenders?
Eighteen men - including former warlords, ex-spies and members of the country's former communist government - initially put themselves forward to fight the election, but five have dropped out.
Not one woman is running for president, and only three women appear on the tickets of others.
How does the vote work?
The Afghan president is elected through a two-round direct voting system. A run-off is triggered if no candidate receives more than 50% of the votes cast.
Results are due three weeks later. A second round, if needed, will be held in November
Almost 5,000 polling stations will be open on Saturday for people to cast their votes.
A biometric voting system - based on fingerprints - will be used across the country to try to avoid fraud as people cast their ballots.