The Barakzai dynasty, also known as the Muhammadzai dynasty ("the ruling sub-clan of the Barakzai"), ruled what is now Afghanistan from 1823 to 1978, when the monarchy ended de jure under Musahiban Mohammad Zahir Shah and de facto under his cousin Mohammad Daoud Khan. The Barakzai dynasty was established by Dost Mohammad Khan after the Durrani Empire of Ahmad Shah Durrani was removed from power. The Muhammadzai era was known for its progressivist modernity, practice of Sufism, peaceful security and neutrality, in which Afghanistan was referred to as the "Switzerland of Asia".