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 in 1885–1886, 1888–1889, and 1891 before emerging as sole leader. 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 by his orders, and Omdurman, at first intended as a temporary camp, was made his capital.