Among the historical Mahdist claims noted elsewhere, the movement led by Muhammad Ahmad in Sudan went furthest, producing an independent state that governed for over a decade and defeated a major imperial power before its destruction.
Muhammad Ahmad, a Sudanese religious teacher, declared himself the Mahdi in 1881, calling for a return to authentic Islam purified of Sufi accretion and Ottoman-Egyptian corruption, and gathered a following, the Ansar, among Sudanese tribes resentful of Ottoman-Egyptian taxation. His forces defeated Egyptian and, in 1885, British-led forces at Khartoum, killing the British general Charles Gordon in an episode that became a byword in Britain for imperial humiliation and fixed the Mahdist revolt in the Western historical imagination, disproportionately to its place in Mahdist doctrine generally.
Muhammad Ahmad died months after taking Khartoum, and leadership passed to his deputy, the Khalifa Abdallahi, who governed the resulting state, centered on Omdurman, for over a decade. The state was destroyed in 1898 at the Battle of Omdurman by an Anglo-Egyptian force under Herbert Kitchener, employing the era's advances in rifle and artillery technology against Mahdist forces fighting largely with older weapons, a battle with a lopsided casualty count that became a standard case study in the technological gap between European and non-European forces in the late colonial period. The episode illustrates a pattern in other Mahdist movements: a claim that begins as a religious movement can, under the right conditions, generate a state and an army, with consequences disproportionate to the theological modesty with which Sunni scholarship treats any living Mahdist claim.