Mohammed Ahmed al-Mahdi enlisted the people of Sudan in what he declared a jihad against the administration that was based in Khartoum, which was dominated by Egyptians and Turks. The Khartoum government initially dismissed the Mahdi's revolution; he defeated two expeditions sent to capture him in the course of a year. The Mahdi's power increased, and his call spread throughout the Sudan, with his movement becoming known as the Ansar. During the same period, the 'Urabi revolution broke out in Egypt, with the British occupying the country in 1882. Britain appointed Charles Gordon as General-Governor of Sudan. Months after his arrival in Khartoum and after several battles with the Mahdi rebels, Mahdist forces captured Khartoum, and Gordon was killed in his palace. The Mahdi did not live long after this victory, and his successor Abdallahi ibn Muhammad consolidated the new state, with administrative and judiciary systems based on their interpretation of Islamic law.