Khartoum initially grew because of the Turko-Egyptian conquest of Sudan in 1821. 

Troops loyal to the Mahdi Muhammad Ahmad laid siege to Khartoum against the defenders led by British General Charles George Gordon, resulting in the massacre of the Anglo-Egyptian garrison.

Omdurman was the scene of the bloody battle in which British forces under Sirdar Horatio Kitchener defeated the Mahdist forces defending the city.