Divided by the two Rivers Nile, Khartoum is a tripartite metropolis with an estimated overall population of over five million people, consisting of Khartoum proper, and linked by bridges to Khartoum North (الخرطوم بحري al-Kharṭūm Baḥrī) and Omdurman (أم درمان Umm Durmān) to the west.
The origin of the word, "Khartoum", is uncertain. One theory argues that khartoum is derived from Arabic khurṭūm (خرطوم trunk or hose), probably referring to the narrow strip of land extending between the Blue and White Niles. Dinka scholars argue that the name derives from the Dinka words "Khier-tuom" which translates to a "place where rivers meet". This is supported by historical accounts which place the Dinka homeland in central Sudan as late as the 13th-15th centuries A.D. Captain J.A. Grant, who reached Khartoum in 1863 with Captain Speke's expedition, thought the name was most probably from the Arabic qurtum (قرطم safflower, i.e., Carthamus tinctorius), which was cultivated extensively in Egypt for its oil to be used as fuel. Some scholars speculate that the word derives from the Nubian word, Agartum ("the abode of Atum"), the Nubian and Egyptian god of creation. Other Beja scholars suggest "Khartoum" is derived from the Beja word, Hartoom ("meeting"). Additionally, the dream-interpreting magicians in Genesis 41:8 are referred to as חַרְטֻמֵּ֥י מצרים("Khartoumei Mitzrayim" - Magicians of Egypt). There is some speculation that they learned their craft at an academy in the south of Egypt from which the city takes its name.
In 1821, Khartoum was established 24 kilometres (15 mi) north of the ancient city of Soba, by Ibrahim Pasha, the son of Egypt's ruler, Muhammad Ali Pasha, who had just incorporated Sudan into his realm. Originally, Khartoum served as an outpost for the Egyptian Army, but the settlement quickly grew into a regional centre of trade. It also became a focal point for the slave trade. Later, it became the administrative center of Sudan and official capital.
On 13 March 1884, troops loyal to the Mahdi Muhammad Ahmad started a siege of Khartoum, against defenders led by British General Charles George Gordon. The siege ended in a massacre of the Anglo-Egyptian garrison when on 26 January 1885 the heavily-damaged city fell to the Mahdists.