 Britain's involvement in the Sudan was a consequence of its support for the Khedive of Egypt following the repression of Urabi Pasha's revolt in 1882.Despite Egypt still being nominally part of the Ottoman Empire, the Khedive's rule was dependent on direct British support, given to ensure the security of the Suez Canal and the elimination of the Sudanese slave trade.However, the British government under Prime Minister William Ewart Gladstone sought to stay out of affairs in Egyptian-governed Sudan, that was threatened by an uprising led by the Mahdi, Muhammad Ahmad, who declared a "Jihad", against the ‘Turks’, represented by the Egyptian troops.