On February 20, 1919, Habibullah, the ruler of Afghanistan, was assassinated on a hunting trip. He had not declared a succession, but left his third son, Amanullah, in charge in Kabul. Because Amanullah controlled both the national treasury and the army, he was well situated to seize power. Army support allowed Amanullah to suppress other claims and imprison those relatives who would not swear loyalty to him. Within a few months, the new amir had gained the allegiance of most tribal leaders and established control over the cities.