Al Mahdi who set out from Aba Island with a few followers armed with sticks and spears ended by making himself master of almost all the territory formerly occupied by the Egyptian government. His main aim was to conquer Egypt and to follow his conquests by attacking Europe.
The Muslim religion was engrained in him. He offered to the ansars (his followers) and those who surrendered to him a choice between adopting Islam or being killed. The following proclamation was published by the Mahdi: Let all show penitence before God, and abandon all bad and forbidden habits, such as the use of wine and tobacco, lying, degrading acts of the flesh etc. All those who do not pay attention to these principles disobey God and his Prophet and they shall be punished in accordance with the law. These precepts were ferociously enforced. Flogging to death and the cutting off of the hands were the penalties enforced as according to Islamic law.
During the month of Ramadan when absolute austerity was enforced upon his followers, huge crowds awaited the master’s appearance at prayers but they had little notion on what was going on inside the Mahdi’s house. There were several different accounts of his death. Some say that he was poisoned while others assert that typhus or small pox were the cause of his death. He died on 22 June 1885 exactly 5 months after the killing of Gordon.
After a power struggle amongst his deputies, Abdallahi ibn Muhammad, with the help primarily of the Baqqara Arabs of western Sudan, overcame the opposition of the others and emerged as unchallenged leader of the Mahdiyah. After consolidating his power, Abdallahi ibn Muhammad assumed the title of Khalifa (successor) of the Mahdi, instituted an administration, and appointed Ansar (who were usually Baqqara) as emirs over each of the several provinces.
Regional relations remained tense throughout much of the Mahdiyah period, largely because of the Khalifa’s brutal methods to extend his rule throughout the country. In 1887, a 60,000-man Ansar army invaded Ethiopia, penetrating as far as Gondar. In March 1889, king Yohannes IV of Ethiopia, marched on Metemma; however, after Yohannes fell in battle, the Ethiopian forces withdrew. Abd ar Rahman an Nujumi, the Khalifa’s general, attempted an invasion of Egypt in 1889, but British-led Egyptian troops defeated the Ansar at Tushkah. The failure of the Egyptian invasion broke the spell of the Ansar’s invincibility. The Belgians prevented the Mahdi’s men from conquering Equatoria, and in 1893, the Italians repelled an Ansar attack at Akordat (in Eritrea) and forced the Ansar to withdraw from Ethiopia.
Info from https://en.wikipedia.org/wiki/Sudan