On Saturday, millions of Afghan voters will choose 249 members of parliament in elections delayed since 2016.
The security situation in Afghanistan is particularly tense. This summer was a bloody one for the country with suicide bombings, insurgent attacks and assassinations weekly.
Below is everything you need to know about the country's parliamentary elections.
What is Afghanistan voting for?
Afghans will choose members of parliament for the lower house of their National Assembly. There are also district elections taking place.
There are 249 seats in the House of the People and nearly nine million Afghans are registered to vote. The number of registered citizens was boosted by a leaflet drop to counter attempts by militants who want to suppress voting. Afghans will cast ballots at more than 21,000 polling stations, protected by 54,000 police and soldiers.
The election was supposed to be held in October 2016 but was delayed until July 2018 over security concerns and political disputes about voter registration. They were delayed a second time to October 20, 2018.
Afghans who have been citizens for 10 years can nominate themselves as candidates, providing they have not been convicted of a crime and are over the age of 25.
Previously very few candidates would be under the age of 40, but this year a wave of young people entered politics, hoping to fight corruption.
The electoral system is a single non-transferable vote, in which voters in a province cast a ballot for a candidate. Each province is allocated a set number of seats and the candidates with the most amount of seats fill those seats. So if a province is allocated six seats, then the candidates with the six-most seats will be elected to parliament.
The number of seats per province is allocated by population size, with at least two per province. Elections will take place in 34 provinces, but not in Ghazni, where security concerns prevented voting.
How safe are the elections?
The security situation in Afghanistan is tense. The Taliban control many rural areas of the country and ISIS has a small but potent presence.
About 56 per cent of Afghanistan's districts are under government control and 30 per cent are contested territory. Around 14 per cent are under the control of insurgents, according to Nato.
At least 10 candidates have been killed during the campaign and more than 100 people have died in election-related violence.
On Wednesday, an Afghan MP died when a bomb planted under a chair in his office exploded. Last week 22 people lost their lives in a blast at an election rally for a female candidate.
In April, 57 people were killed and 112 injured when ISIS blew up a voter registration centre in Kabul.
During the last elections in 2010, the Taliban were accused of widespread voter intimidation. Some citizens were left letters during the night claiming any finger marked with the indelible ink used to prevent voting fraud would be cut off.
Afghanistan's presidential elections
In April next year, Afghanistan is due to hold a presidential election. This month's parliamentary elections are seen as a en as a dry run for the scheduled vote for president.
Afghanistan has a presidential political system where the people directly elect a head of state, who is commander-in-chief of the armed forces, builds a Cabinet, endorses laws and declares or ends states of emergency. Presidents are elected for five-year terms.
In 2014 Afghanistan held a presidential election, but a clear winner was never established. The United States had to broker a deal between Ashraf Ghani, who was made president, and Abdullah Abdullah who was awarded the new post of chief executive.