The president of the Islamic Republic of Afghanistan was constitutionally the head of state and head of government of the Islamic Republic of Afghanistan (2004–2021) and Commander-in-Chief of the Afghan Armed Forces. On 15 August 2021, as the Taliban took over Kabul, President Ashraf Ghani fled Afghanistan and took refuge in the United Arab Emirates. After Ghani fled, the Taliban occupied the Arg presidential palace. Eligibility and selection process Article 62 of the 2004 Constitution of Afghanistan stated that a candidate for the office of President had to: be a citizen of Afghanistan, Muslim, born of Afghan parents; not be a citizen of another country; be at least forty years old when declaring candidacy; not have been convicted of crimes against humanity, a criminal act or deprived of civil rights by a court; not have previously served more than two terms as president. Powers The 2004 Constitution granted the president wide powers over military and legislative affairs, with a relatively weak national bicameral National Assembly, the House of the People (Wolesi Jirga) and the House of Elders (Meshrano Jirga). A president could only serve up to two five-year terms. Hamid Karzai began his first five-year term in 2004. After his second term ended in 2014, Ashraf Ghani was elected as the next Afghan president. Last election See also Prime Minister of Afghanistan Chief Executive (Afghanistan) References 1973 establishments in Afghanistan 2021 disestablishments in Afghanistan Heads of state of the Islamic Republic of Afghanistan Government of the Islamic Republic of Afghanistan