Following the invasion by Muhammad Ali in 1819, Sudan was governed by an Egyptian administration. Because of the heavy taxes it imposed and because of the bloody start of the Turkish-Egyptian rule in Sudan, this colonial system was resented by the Sudanese people.

Throughout the period of Turco-Egyptian rule, many segments of the Sudanese population suffered extreme hardship because of the system of taxation imposed by the central government. Under this system, a flat tax was imposed on farmers and small traders and collected by government-appointed tax collectors from the Sha'iqiyya tribe of northern Sudan. In bad years, and especially during times of drought and famine, farmers were unable to pay the high taxes. Fearing the brutal and unjust methods of the Sha'iqiyya, many farmers fled their villages in the fertile Nile Valley to the remote areas of Kordofan and Darfur. These migrants, known as "jallaba" after their loose-fitting style of dress, began to function as small traders and middlemen for the foreign trading companies that had established themselves in the cities and towns of central Sudan[citation needed]. The jallaba were also known to be slave trading tribes.

By the middle 19th century the Ottoman Imperial subject administration in Egypt was in the hands of Khedive Ismail. Khedive Ismail's spending had put Egypt into huge debt, and when his financing of the Suez Canal started to crumble, Great Britain stepped in and repaid his loans in return for controlling shares in the canal. As the most direct route to India, the jewel in the British Crown, control over the Suez Canal was of paramount strategic importance, and British commercial and imperial interests dictated the need to seize or otherwise control it. Thus an ever-increasing British role in Egyptian affairs seemed necessary. With Khedive Ismail's spending and corruption causing instability, in 1873 the British government supported a program whereby an Anglo-French debt commission assumed responsibility for managing Egypt's fiscal affairs. This commission eventually forced Khedive Ismail to abdicate in favor of his son Tawfiq in 1877, leading to a period of political turmoil.

Upon Ismail's abdication in 1877, Gordon found himself with dramatically decreased support. Exhausted by years of work, he resigned his post in 1880 and left early the next year. His policies were soon abandoned by the new governors, but the anger and discontent of the dominant Arab minority was left unaddressed.[citation needed]

Although the Egyptians were fearful of the deteriorating conditions, the British refused to get involved, "Her Majesty’s Government are in no way responsible for operations in the Sudan," the Foreign Secretary Earl Granville noted.

This banner is a declaration of faith and allegiance into Allah, and was carried into battle by the Sudanese Mahdist Army. The color of the banner identifies the fighting unit. From Omdurman, 1898. The Kelvingrove Art Gallery and Museum, Glasgow, UK. Given by Miss Victoria MacBean, 1929.

Among the forces historians see as the causes of the uprising are ethnic Sudanese anger at the foreign Turkish Ottoman rulers, Muslim revivalist anger at the Turks' lax religious standards and willingness to appoint non-Muslims such as the Christian Charles Gordon to high positions, and Sudanese Sufi resistance to "dry, scholastic Islam of Egyptian officialdom."[2] Another widely reported potential source of frustration was the Turco-Egyptian abolition of the slave trade, one of the main sources of income in Sudan at the time.[3]

In the 1870s, a Muslim cleric named Muhammad Ahmad preached renewal of the faith and liberation of the land, and began attracting followers. Soon in open revolt against the Egyptians, Muhammad Ahmad proclaimed himself the Mahdi, the promised redeemer of the Islamic world. In August 1881 the then-governor of the Sudan, Raouf Pasha, sent two companies of infantry each with one machine gun to arrest him. The captains of the two companies were each promised promotion if their soldiers were the ones to return the Mahdi to the governor. Both companies disembarked from the steamer that had brought them up the Nile to Aba Island and approached the Mahdi's village from separate directions. Arriving simultaneously, each force began to fire blindly on the other, allowing the Mahdi's scant followers to attack and destroy each force in turn at the Battle of Aba.[4]

The Mahdi then began a strategic retreat to Kordofan, where he was at a distance from the seat of government in Khartoum. This movement, couched as a triumphal progress, incited many of the Arab tribes to rise in support of the Jihad the Mahdi had declared against the "Turkish oppressors." Another Egyptian expedition dispatched from Fashoda was ambushed and slaughtered on the night of 9 December 1881.[5]

The Mahdi also legitimized his movement by drawing deliberate parallels to the life of the Prophet Muhammad. He called his followers Ansar, after the people who greeted the Prophet in Medina, and he called his flight from the British, the hijrah, after the Prophet's flight from the Quraysh. The Mahdi also appointed commanders to represent three of the four Righteous Caliphs;[6] for example, he announced that Abdullahi ibn Muhammad, his eventual successor, represented Abu Bakr Al Sidiq, the Prophet's successor.

The Egyptian administration in the Sudan, now thoroughly concerned by the scale of the uprising, assembled a force of 4,000 troops under Yusef Pasha. This force approached the Mahdist gathering, whose members were poorly clothed, half starving, and armed only with sticks and stones. However, supreme overconfidence led the Egyptian army into camping within sight of the Mahdist 'army' without posting sentries. The Mahdi led a dawn assault on 7 June 1882, which slaughtered the army to a man. The rebels gained vast stores of arms and ammunition, military clothing and other supplies.[7]

With the Egyptian government now passing largely under British control (see: History of modern Egypt and Anglo-Egyptian War (1882)), the European powers became increasingly aware of the troubles in the Sudan. The British advisers to the Egyptian government gave tacit consent for another expedition. Throughout the summer of 1883, Egyptian troops were concentrated at Khartoum, eventually reaching the strength of 7,000 infantry, 1,000 cavalry, 20 machine guns, and artillery. This force was placed under the command of a retired British Indian Staff Corps officer William Hicks and twelve European officers. The force was, in the words of Winston Churchill, "perhaps the worst army that has ever marched to war"[8]—unpaid, untrained ,and undisciplined, its soldiers having more in common with their enemies than with their officers.

El Obeid, the city whose siege Hicks had intended to relieve, had already fallen by the time the expedition left Khartoum, but Hicks continued anyway, although not confident of his chances of success. Upon his approach, the Mahdi assembled an army of about 40,000 men and drilled them rigorously in the art of war, equipping them with the arms and ammunition captured in previous battles. On 3 and 4 November 1883, when Hicks' forces actually offered battle, the Mahdist army was a credible military force, which utterly defeated Hicks' army—only about 500 Egyptians survived—at the Battle of El Obeid.[9]

At this time, the British Empire was increasingly entrenching itself in the workings of the Egyptian government. Egypt was groaning under a barely maintainable debt repayment structure for her enormous European debt.[10] For the Egyptian government to avoid further interference from its European creditors, it had to ensure that the debt interest was paid on time, every time. To this end, the Egyptian treasury, initially crippled by corruption and bureaucracy, was placed by the British almost entirely under the control of a 'Financial Advisor', who exercised the power of veto over all matters of financial policy. The holders of this office—first Sir Auckland Colvin, and later Sir Edgar Vincent[11]—were instructed to exercise the greatest possible parsimony in Egypt's financial affairs. Maintaining the garrisons in the Sudan was costing the Egyptian government over 100,000 Egyptian pounds a year,[12] an unmaintainable expense.

Charles Gordon as Governor of the Sudan

It was therefore decided by the Egyptian government, under some coercion by their British controllers, that the Egyptian presence in the Sudan should be withdrawn and the country left to some form of self-government, likely headed by the Mahdi. The withdrawal of the Egyptian garrisons stationed throughout the country, such as those at Sennar, Tokar and Sinkat, was therefore threatened unless it was conducted in an orderly fashion. The Egyptian government asked for a British officer to be sent to the Sudan to co-ordinate the withdrawal of the garrisons. It was hoped that Mahdist forces would judge an attack on a British subject to be too great a risk, and hence allow the withdrawal to proceed without incident. It was proposed to send Charles 'Chinese' Gordon. Gordon was a gifted officer, who had distinguished himself in several campaigns in the Far East, particularly China (See the Second Opium War). However, he was also renowned for his aggression and rigid personal honour,[13] which, in the eyes of several prominent British officials in Egypt, made him unsuitable for the task. Sir Evelyn Baring (later the Earl of Cromer), the British Consul-general in Egypt, was particularly opposed to Gordon's appointment, only reluctantly being won over by the British press and public. Gordon was eventually given the mission, but he was to be accompanied by the much more level-headed and reliable Colonel John Stewart. It was intended that Stewart, while nominally Gordon's subordinate, would act as a brake on the latter and ensure that the Sudan was evacuated quickly and peacefully.

Gordon left England on 18 January 1884[14] and arrived in Cairo on the evening of 24 January.[15] Gordon was largely responsible for drafting his own orders,[16] along with proclamations from the Khedive announcing Egypt's intentions to leave the Sudan. Gordon's orders, by his own request, were unequivocal and left little room for misinterpretation.

Gordon arrived in Khartoum on 18 February,[17] and immediately became apprised of the vast difficulty of the task. Egypt's garrisons were scattered widely across the country; three—Sennar, Tokar and Sinkat—were under siege,[18] and the majority of the territory between them was under the control of the Mahdi. There was no guarantee that, if the garrisons were to sortie, even with the clear intention of withdrawing, they would not be cut to pieces by the Mahdist forces. Khartoum's Egyptian and European population was greater than all the other garrisons combined, including 7,000 Egyptian troops [19] and 27,000 civilians[20] and the staffs of several embassies. Although the pragmatic approach would have been to secure the safety of the Khartoum garrison and abandon the outlying fortifications and their troops to the Mahdi, Gordon became increasingly reluctant to leave the Sudan until "every one who wants to go down [the Nile] is given the chance to do so,"[21] feeling it would be a slight on his honour to abandon any Egyptian soldiers to the Mahdi. He also became increasingly fearful of the Mahdi's potential to cause trouble in Egypt if allowed control of the Sudan, leading to a conviction that the Mahdi must be "crushed," by British troops if necessary, to assure the stability of the region. It is debated[22] whether or not Gordon deliberately remained in Khartoum longer than strategically sensible, seemingly intent on becoming besieged within the town. Gordon's brother, H. W. Gordon, was of the opinion that the British officers could easily have escaped from Khartoum up until 14 December 1884.[23]

Whether or not it was the Mahdi's intention, in March 1884, the Sudanese tribes to the north of Khartoum, who had previously been sympathetic or at least neutral towards the Egyptian authorities, rose in support of the Mahdi. The telegraph lines between Khartoum and Cairo were cut on 15 March,[24] severing communication between Khartoum and the outside world.

An aerial view of the confluence of the Nile rivers. Khartoum lies between the two rivers, with Omdurman on the west bank slightly downstream.

Gordon's position in Khartoum was very strong, as the city was bordered to the north and east by the Blue Nile, to the west by the White Nile, and to the south by ancient fortifications looking on to a vast expanse of desert. Gordon had food for an estimated six months,[25] several million rounds of ammunition in store,[26] with the capacity to produce a further 50,000 rounds per week,[27] and 7,000 Egyptian soldiers.[28] However, outside the walls, the Mahdi had mustered about 50,000 Dervish soldiers, and as time went on, the chances of a successful breakout became slim. Gordon had enthusiastically supported the idea of recalling the notorious former slaver, Pasha Zobeir, from exile in Egypt to organize and lead a popular uprising against the Mahdi.[29] When this idea was vetoed by the British government, Gordon proposed a number of alternative means to salvage his situation and proposed them successively to his British superiors. All were similarly vetoed. Among these alternatives were:

Making a breakout southwards along the Blue Nile towards Abyssinia (now Ethiopia), which would have enabled him to collect the garrisons stationed along that route. However, the window for navigation of the upper reaches of that river was very narrow.[30]

Requesting the services of several thousand Turkish troops be sent to quell the uprising.[32]

Proposed visiting the Mahdi himself to explore a possible solution.[31]

Eventually, it became impossible for Gordon to be relieved without British troops. An expedition was duly dispatched under Sir Garnet Wolseley. However, as the level of the White Nile fell through the winter, muddy 'beaches' at the foot of the walls were exposed. With starvation and cholera rampant in the city and the morale of the Egyptian troops shattered, Gordon's position became untenable and the city fell on 26 January 1885, after a siege of 313 days.

The British Government, reluctantly and late, but under strong pressure from public opinion, sent a relief column under Sir Garnet Wolseley to relieve the Khartoum garrison. This was described in some British papers as the 'Gordon Relief Expedition', a title which Gordon strongly objected to. After defeating the Mahdists at Abu Klea, the column arrived within sight of Khartoum, only to find they were too late: the city had fallen two days earlier, and Gordon and the garrison had been massacred. Liberal Party Prime Minister William Gladstone suffered a deep loss in popularity due to his reluctance to support Gordon. The Conservative Party would win the following election.

The British also sent an expeditionary force under Lieutenant-General Sir Gerald Graham, including an Indian contingent, to Suakin in March 1885. It became known as the Suakin Expedition. Although it was successful in the two actions it fought, it failed to change the military situation and was withdrawn.[33] These events temporarily ended British and Egyptian involvement in Sudan, which passed completely under the control of the Mahdists.

Muhammad Ahmad died soon after his victory on 22 June 1885, and was succeeded by the KhalifaAbdallahi ibn Muhammad, who proved to be an able, albeit ruthless, ruler of the Mahdiyah (or the Mahdist state).

In the intervening years, Egypt had not renounced her claims over Sudan, and the British authorities considered that claim legitimate. Under strict control by British administrators, Egypt's economy had been rebuilt, and the Egyptian army reformed, this time trained and led by British officers and non-commissioned officers. The situation evolved in a way that allowed Egypt, both politically and militarily, to reconquer Sudan.[34]

In 1891, a Catholic priest, Father Joseph Ohrwalder, escaped from captivity in Sudan. Later, in 1895, the erstwhile Governor of Darfur, Rudolf von Slatin, managed to escape from the Khalifa's prison. Besides providing vital intelligence on the Mahdist dispositions, both men wrote detailed accounts of their experiences in Sudan. Written in collaboration with Reginald Wingate, a proponent of the reconquest of Sudan, both works emphasized the savagery and barbarism of the Mahdists,[35] and through the wide publicity they received in Britain, served to influence public opinion in favour of military intervention.[36]

In 1896, when Italy suffered a heavy defeat at the hands of the Ethiopians at Adwa, the Italian position in East Africa was seriously weakened. The Mahdists threatened to retake Kassala, which they had lost to the Italians in 1894. The British government judged it politic to assist the Italians by making a military demonstration in northern Sudan. This coincided with the increased threat of French encroachment on the Upper Nile regions. Lord Cromer, judging that the Conservative-Unionist government in power would favour taking the offensive, managed to extend the demonstration into a full-fledged invasion.[37]

The Battle of Omdurman

Herbert Kitchener, the new Sirdar (commander) of the Anglo-Egyptian Army, received his marching orders on 12 March, and his forces entered Sudan on the 18th. Numbering at first 11,000 men, Kitchener's force was armed with the most modern military equipment of the time, including Maxim machine-guns and modern artillery, and was supported by a flotilla of gunboats on the Nile. Their advance was slow and methodical, while fortified camps were built along the way, and two separate 3 ft 6 in (1,067 mm) gauge railways were hastily constructed from a station at Wadi Halfa: the first rebuilt Isma'il Pasha's abortive and ruined former line south along the east bank of the Nile to supply the 1896 Dongola Expedition[a] and a second, carried out in 1897, was extended along a new line directly across the desert to Abu Hamad - which they captured in the Battle of Abu Hamed on 7 August 1897 - [40] to supply the main force moving on Khartoum.[38][39] It was not until 7 June 1896, that the first serious engagement of the campaign occurred, when Kitchener led a 9,000 strong force that wiped out the Mahdist garrison at Ferkeh.[41]

In 1898, in the context of the scramble for Africa, the British decided to reassert Egypt's claim on Sudan. An expedition, commanded by Kitchener, was organised in Egypt. It was composed of 8,200 British soldiers and 17,600 Egyptian and Sudanese soldiers commanded by British officers. The Mahdist forces (sometimes called the Dervishes) were more numerous, numbering more than 60,000 warriors, but lacked modern weapons.

After defeating a Mahdist force in the Battle of Atbara in April 1898, the Anglo-Egyptians reached Omdurman, the Mahdist capital in September. The bulk of the Mahdist army attacked, but was cut down by British machine-guns and rifle fire.

The remnant, with the Khalifa Abdullah, fled to southern Sudan. During the pursuit, Kitchener's forces met a French force under Major Jean-Baptiste Marchand at Fashoda, resulting in the Fashoda Incident. They finally caught up with Abdullah at Umm Diwaykarat, where he was killed, effectively ending the Mahdist regime.

The reconquest of the Sudan is the subject of the 2008 novel After Omdurman by John Ferry.

The siege of Khartoum, its end, the recapture of the Sudan all feature strongly in the 2005 novel, The Triumph of the Sun by Wilbur Smith.

One of the protagonists of the BBC series Ripper Street, Police Sergeant Bennet Drake (Jerome Flynn), is a veteran of the campaign, and the experience comes back to haunt him in the first-season episode "The Weight of One Man's Heart."

The author and marine archaeologist David Gibbins draws extensively on the campaign and the Siege of Khartoum for sections of his 2013 novel Pharaoh.

In the British comedy Dad's Army, character Lance Corporal Jones (played by Clive Dunn) is a veteran of the campaign, making frequent references to the "Mad Mahdi" and his presence at the Battle of Omderman. The episode "The Two and a Half Feathers" sees the arrival of one of Jones' former comrades, who questions Jones' service record and alleges cowardice (giving rise to the episode's title, a play on Mason's novel "The Four Feathers").

^This line was so out of the way, badly sited, and hastily rebuilt that it was abandoned in 1904.[38] The Abu Hamad route, however, became the start of the entire subsequent Sudanese rail network.[39] The Cape gauge hastily adopted to use the available rolling stock provided from South Africa meant that the Sudanese system could not (and still cannot) link directly to Egypt's standard-gauge system but required transshipment via steamer from Asyut to Halfa.