The Anglo-Egyptian invasion of Sudan in 1896–1899 was a reconquest of territory lost by the Khedives of Egypt in 1884 and 1885 during the Mahdist War. The British had failed to organise an orderly withdrawal of Egyptian forces from Sudan, and the defeat at Khartoum left only Suakin and Equatoria under Egyptian control after 1885. The invasion of 1896-99 defeated and destroyed the Mahdist state and re-established Anglo-Egyptian rule, which remained until Sudan became independent in 1956.
There was a considerable body of opinion in Britain in favour of retaking Sudan after 1885, largely to 'avenge Gordon'. However Lord Cromer, the British Consul-General in Egypt, had been the architect of the British withdrawal after the Mahdist uprising. He remained sure that Egypt needed to recover its financial position before any invasion could be contemplated. 'Sudan is worth a good deal to Egypt ' he said, 'but it is not worth bankruptcy and extremely oppressive taxation.' He felt it was necessary to avoid 'being driven into premature action by the small but influential section of public opinion which persistently and strenuously advocated the cause of immediate reconquest.' As late as 15 November 1895 he had been assured by the British government that it had no plans to invade Sudan.
By 1896 however it was clear to Prime Minister Lord Salisbury that the interests of other powers in the Sudan could not be contained by diplomacy alone - France, Italy and Germany all had designs on the region that could only be contained by re-establishing Anglo-Egyptian rule. The catastrophic defeat of the Italians by Menelik II of Ethiopia at the Battle of Adwa in March 1896 also raised the possibility of an anti-European alliance between Menelik and the Khalifa of Sudan. After Adwa the Italian government appealed to Britain to create some kind of military diversion to prevent Mahdist forces from attacking their isolated garrison at Kassala, and on 12 March the British cabinet authorised an advance on Dongola for this purpose. Salisbury was also at pains to reassure the French government that Britain intended to proceed no further than Dongola, so as to forestall any move by the French to advance some claim of their own on part of Sudan. The French government had in fact just dispatched Jean-Baptiste Marchand up the Congo with the stated aim of reaching Fashoda on the White Nile and claiming it for France. This encouraged the British to attempt the full-scale defeat of the Mahdist state and the restoration of Anglo-Egyptian rule, rather than just providing a military diversion as Italy had requested.