After the unexpected death of the Mahdi in June 1885, Abdullah succeeded as leader of the Mahdists, declaring himself "Khalifat al-Mahdi", or successor of the Mahdi. He faced internal disputes over his leadership with the
Ashraf and he had to suppress several revolts during 1885–1886, 1888–1889, and 1891 before emerging as sole leader of the Mahdiyah or
Mahdist State. At first the Mahdiyah was run on military lines as a jihad state, with the courts enforcing
Sharia law and the precepts of the Mahdi, which had equal force. Later the Khalifa established a more traditional administration.
Khartoum was deserted on his orders, and
Omdurman, at first intended as a temporary camp, was made his capital. He felt the best course of action to keep internal problems to a minimum was to expand into
Ethiopia and
Egypt. The Khalifa invaded
Ethiopia with 60,000 Ansar troops and sacked
Gondar in 1887, destroying nearly every church in the city. He later refused to make peace. He successfully repulsed the Ethiopians at the
Battle of Metemma on 9 March 1889, where the Ethiopian emperor
Yohannes IV was killed. He created workshops to maintain steam boats on the Nile and to manufacture ammunition. But the Khailfa underestimated the strength of the Anglo-Egyptian forces and suffered a crushing defeat in Egypt. , from
Rudolf Carl von Slatin's
Fire and Sword in the Sudan (1896) The Egyptians failed to counter up the
Nile; however in the 1890s the state became strained economically, and suffered from crop failures instead. The
Ashraf, in November 1891, decided to press again, but were put down one final time; they were prevented from causing any further issues. During the next four years, the Khalifa strengthened the military and financial situation of Sudan; however this was not enough, as Sudan became threatened by the
Italian,
French and
British imperial forces that surrounded it. In 1896, an Anglo-Egyptian army under General
Herbert Kitchener began the reconquest of Sudan. ==Defeat and death==