Afterwards the Barakzai dynasty regained power, eventually transformed the Emirate into the Kingdom of Afghanistan in 1926, and ruled the country (with an interruption in 1929) until the last king, Mohammad Zahir Shah, was deposed in the 1973 coup d'état, led by his first cousin Mohammad Daoud Khan.
Despite being part of the Barakzai dynasty, Daoud Khan departed from tradition and did not proclaim himself Shah, instead abolished the monarchy and established the Republic of Afghanistan, with himself as President.
[9][10] President Hamid Karzai became the first ever democratically elected head of state of Afghanistan on 7 December 2004.
His successor, Ashraf Ghani, was in power from 29 September 2014 to 15 August 2021, when he fled the country as Kabul fell to the Taliban following its 2021 offensive.
[11] Upon its recapture of Kabul, the Taliban reinstated the Islamic Emirate of Afghanistan, and its supreme leader since 2016, Islamic scholar Hibatullah Akhundzada, de facto succeeded Ghani as head of state.