Northern Sudan has long been inhabited by Nubian people who farm the Nile valley and follow a nomadic pastoral way of life elsewhere. Sudan came under Egyptian suzerainty when an Ottoman force conquered and occupied the region in 1820-21. Muhammed Ahmad, a Sudanese religious leader based on Aba Island, proclaimed himself Mahdi on 29 June 1881. His followers won a series of victories against the Egyptians culminating in the capture of Khartoum in January 1885.
Muhammed Ahmad died a few months later. His successor, Abdallahi ibn Muhammad, maintained the independence of the Mahdist state until 1898, when an Anglo-Egyptian force regained control. The Mahdi's eldest surviving son, Abd al-Rahman al-Mahdi, was the religious and political leader of the Ansar throughout most of the colonial era of the Anglo-Egyptian Sudan (1898-1955) and for a few years after the Sudan gained independence in January 1956. His descendants have led the movement since then.
Muhammed Ahmad claimed to receive direct inspiration from Allah. After taking power in Sudan between 1883 and 1885 he established the Mahdist regime, which was ruled by a modified version of the sharia. To distinguish his followers from adherents of other Sufi orders, Muhammed Ahmad forbade the use of the word darwish (dervish) to describe his followers, replacing it with the title Ansar, the term Muhammad used for the people of Medina who welcomed him and his followers after their flight from Mecca.
Muhammed Ahmed appointed three Caliphs or lieutenants: Abdallahi ibn Muhammad, Ali wad Hilu, and his young cousin and son in law Muhammad Sharif. He emulated Muhammad, who was followed by the four Rashidun caliphs. Abdillahi corresponded to Abu Bakr, Ali wad Hilu to Umar and Muhammad Sharif to Ali. Muhammad ibn Ali as-Senussi was to have taken the place of Uthman, but refused the honor. When the Mahdi died on 22 June 1885 a few months after capturing Khartoum, Abdillahi became head of state, although he had to deal with challenges from members of the Mahdi's family and Muhammad Sharif.
The Mahdist state was at first run on military lines as a jihad state, with the courts enforcing Islamic jurisprudence and the precepts of the Mahdi, which had equal force. Later, the Caliph established a more traditional administration. The state was expansionary, and engaged in wars with Ethiopia.
In 1892 General Herbert Kitchener was appointed commander of the Egyptian army. After careful preparations and a slow advance, on 2 September 1898 the main Anglo-Egyptian forces engaged with a Mahdist army of 52,000 at the Battle of Omdurman. With greatly superior firepower, the British won a crushing victory. Caliph Abdillahi fled, and a year later was killed with other Mahdist leaders at the Battle of Umm Diwaykarat (25 November 1899).
According to the hadith, "no one will more resemble me than al-Mahdi". It is said that the Mahdi will appear "after hearts become hard and the earth is filled with wickedness". Following him, the Antichrist will appear, with all the accompanying signs that the Hour has come, one of which will be the descent of the prophet Jesus. Sunnis believe that Jesus will slay al-Masih ad-Dajjal or "the False Messiah".
Muhammed Ahmed revealed himself as "al-Mahdi al-Muntazar", "the awaited guide in the right path", usually seen as the Mahdi. His mission was to redeem the faithful and to prepare the way for the second coming of the Prophet Isa. His movement was fundamentalist, demanding a return to the early principles of Islam. Men were to abstain from alcohol and tobacco, and women were to be strictly secluded.
Ahmed taught that warfare was a duty incumbent upon all Muslims rather than the Hajj (pilgrimage to Mecca). The creed was altered to say that "Muhammad Ahmad is the Mahdi of God and the representative of His Prophet". Another change was that zakat (almsgiving) became a tax paid to the state.
After the fall of the Mahdiyah in 1898, at first the British severely restricted the movements and activity of the Mahdi's son, Abd al-Rahman al-Mahdi. However, he soon emerged as the leader of the Ansar. Throughout most of the colonial era of Anglo-Egyptian Sudan, the British considered him important as a moderate leader of the Mahdists.
In the early 1920s, between 5-15,000 pilgrims were coming to Aba Island each year to celebrate Ramadan. Many of them identified Abd al-Rahman with the prophet Jesus and assumed that he would drive the white Christian colonists out of Sudan. The British found that Abd al-Rahman was in correspondence with agents and leaders in Nigeria and Cameroon, predicting the eventual victory of the Mahdists over the Christians. They blamed him for unrest in these colonies. After pilgrims from West Africa held mass demonstrations on Aba Island in 1924, the Sayyid was told to put a stop to the pilgrimages.
Ali al-Mirghani, leader of the Khatmiyya, was often in opposition to Abd al-Rahman and the Ansar. Both of these Sufi movements organized youth groups and supported competing parties in the run-up to independence. The Anglo-Egyptian treaty of 1936 discussed the future of the Sudan, among other subjects. The Sudanese were not consulted. Educated Sudanese became increasingly concerned, and the Ansar appealed to many people in this group. The leaders portrayed the Mahdi to them as the first Sudanese nationalist and Abd al-Rahman was to many an attractive leader of the independence movement. In contrast, Ali al-Mirghani and the Khatmiyya became identified with the pro-Egyptian school of thought that favored unity of the Nile Valley.
In August 1944 'Abd al-Rahman met with senior Congress members and tribal leaders to discuss formation of a pro-independence political party that was not associated with Mahdism. In February 1945 the National Umma Party had been organized and the party's first secretary, Abdullah Khalil, applied for a government license. The constitution of the party made no mention of Sayyid 'Abd al-Rahman or of the Ansar. The only visible link to Abd al-Rahman was the party's reliance on him for funding.
Sayyid 'Abd al-Rahman died in 1959 aged 74. His son, Sadiq al-Mahdi, was imam of the Ansar for the next two years. After his death in 1961, he was succeeded as imam by his brother, Imam al-Hadi al-Mahdi, while al-Sadiq's son, Sadiq al-Mahdi, took over the leadership of the Umma Party.
In November 1969 Gaafar Nimeiry became Prime Minister at the head of a mainly civilian government. Ansar-led conservative forces were opposed to the government, and Imam al-Hadi al-Mahdi withdrew to his base in Aba Island. In March 1970 Nimeiri tried to visit the island to talk with the imam, but was prevented by hostile crowds. Fighting later broke out between government forces opposed by up to 30,000 Ansar. Army units backed up by air support assaulted the island, and about 3,000 people died.
Sadiq Al-Mahdi was arrested in 1970, and for many years alternated between spells in prison in Sudan and periods of exile. In 1985 Sadiq al-Mahdi was again elected president of the Umma party. In the 1986 elections he became Prime Minister of Sudan, holding office until the government was overthrown in 1989. After further imprisonment and exile, Sadiq al-Mahdi returned to Sudan in 2000 and in 2002 was elected Imam of the Ansar. In 2003 Sadiq was re-elected President of Umma.