The Islamic Republic of Afghanistan was an Islamic republic that existed between 2004 and 2021 during the War in Afghanistan. It was established in 2004 after the 2001 United States invasion of Afghanistan captured most of the country from the Taliban-led Islamic Emirate of Afghanistan. It lost control of the majority of the country to the Islamic Emirate of Afghanistan in August 2021, culminating in the loss of Kabul on 15 August 2021.