Whoever wins the Afghan presidential election will face the difficult challenge of trying to unite a country riven by ethnic, religious, regional and tribal rivalries into one nation under a strong central government.
Karzai is trying to maximise the Pashtun vote
Since his interim government came to power almost three years ago, transitional president Hamid Karzai has been seeking to extend Kabul's control over a nation that has sometimes been described as a series of small fiefdoms.
He has recently stepped up efforts to curb the power of the so-called warlords - powerful regional commanders and leaders who either directly control, or have de facto control over, private militias and have resisted disarming them.
These warlords are in turn linked to a variety of ethnic, religious, tribal and sub-tribal groups and clans.
Long-term rivalries and differences between these groups, which have often fought each other in the past, have played into the election itself.
Broadening the vote
Many candidates are portraying themselves as representing the interests of particular ethnic or religious groups, or the interests of the mujahideen who fought to expel the Soviet army during the 1980s.
Many voters are likely to face pressure to vote for someone from their own ethnic group. Human Rights Watch recently pointed to a string of alleged intimidations.
A girl shows her support for Uzbek General Dostum at a rally
Hamid Karzai, a Pashtun and the favourite in the polls, and Yunus Qanuni, an ethnic Tajik regarded as his closest rival, are among a number of candidates fielding vice-presidential candidates from other ethnic groups in an attempt to broaden their vote.
Decades of war mean there has not been a national census in Afghanistan for many years.
However, it is widely accepted that Pashtuns are the largest ethnic group, with Tajiks second, followed by Uzbeks and Hazara Shia.
There are also many other, smaller, ethnic groups including Turkmens, Baluchs, Aimaks and others.
The various Pashtun presidential candidates have the largest potential ethnic-related vote base.
Mr Karzai also has the advantage of being head of the 500,000 strong Popolzai tribe, a sub-group of Afghanistan's most powerful tribe, the Durranis, who ruled Afghanistan for almost two centuries before being overthrown in the 1970s.
Tribal loyalties count for a lot in Afghanistan. Tribal leaders expect to be obeyed.
Qanuni is part of the powerful Tajik Panjshiri clique
In south-eastern Khost province, elders of the Terezay tribe threatened to burn down houses of tribe members who did not vote for Mr Karzai.
The list of presidential candidates also reflects long-running tensions in Pashtun society between tribal and religious elites.
One candidate in the election, Sayed Ishaq Gailani, is a member of Afghanistan's religious elite.
Descended from a much revered Sufi spiritual leader, his family were extremely influential in Afghanistan during the time of the monarchy.
He and another Pashtun candidate, a conservative religious former mujahideen leader, Ahmad Shah Ahmadzai, may take some votes from Mr Karzai.
There is also a variety of ethnic Tajik presidential hopefuls, the most prominent of whom is Mr Qanuni.
He is hoping to attract not only Tajik voters from his native Panjshir valley but also support from the broader Northern Alliance coalition that fought the Taleban.
He has been capitalising on his position as a trusted aide of the late Ahmed Shah Masood, the celebrated resistance fighter who led Afghanistan's resistance forces in the fight against the Taleban.
Along with Afghanistan's defence and foreign ministers, Mr Qanuni is also part of a powerful Tajik Panjshiri clique that has wielded considerable influence in Afghanistan's transitional administration.
Hazara Shia, Mohammed Mohaqiq, is a well known figure
So much so, in fact, that there were allegations it was undermining Mr Karzai's authority.
Mr Karzai effectively demoted Mr Qanuni from interior minister to education minister two years ago in an apparent attempt to curtail the influence of the Panjshiris.
Mr Karzai also recently removed the Tajik governor of Herat from his post.
The presence of so many other ethnic Tajik candidates in the election could dilute Mr Qanuni's share of the vote.
Among the other candidates, two men, General Abdul Rashid Dostum, an ethnic Uzbek, and Mohammed Mohaqiq, a Hazara Shia, are particularly well known in Afghanistan.
Both have been accused of human rights abuses in the past - allegations they strenuously deny.
But because they represent minorities with insufficient numbers to out-vote the Pashtun and Tajik communities, they are unlikely to win.
There has been speculation that, like a number of other candidates, they could be running in an attempt to increase their political leverage after the polls.
Many of these ethnic groups have fought one another in the past and have been accused of rights abuses against each other.
Many Pashtuns, who feel their influence has been eroded since the fall of the Taleban, will be hoping for a strong victory for Mr Karzai.
Other groups will be hoping that whoever wins, the elections do not lead to an erosion of their own power and influence.