The first developed societies appeared in Nubia, later known as northern Sudan, before the time of the first dynasty of Egypt (3100-2890 B.C.E.). Around 2500 B.C.E., Egyptians began moving south, finding the northern Sudan area occupied by the ancient African Kingdom of Kush. The region came under Egyptian rule from about 1500 until about 780 B.C.E. The people of Kush prospered, enjoying internal and external peace. About 750 B.C.E., a Kushite king called Kashta conquered Upper Egypt and became ruler of Thebes until approximately 740 B.C.E.
In 590 B.C.E., the Egyptian army forced the Kushite court to move to Meroe, approximately 300 miles (500 km) northeast of Khartoum. In the second and third centuries B.C.E., Meroe extended to Sawba, near present-day Khartoum. About 350 C.E., an army from Abyssinia captured and destroyed Meroe city, ending the kingdom's independent existence.
By the sixth century, three states had emerged from the Meroitic Kingdom. Nobatia in the north, in what is now Egypt; the central kingdom, Muqurra (Makuria), was centered about 90 miles (150km) south of modern Dunqulah; and Alawa (Alodia), in the heartland of old Meroe, which had its capital at Sawba (now a suburb of modern-day Khartoum).
Byzantine empress Theodora (500-548) sent a missionary who started preaching Christianity to Nobatia about 540 C.E. The Nubian kings became Monophysite Christians. However, Makuria was of the Melkite Christian faith, unlike Nobatia and Alodia.
Islam came to Egypt in the 640s, and pressed south. Around 651, the governor of Egypt raided as far south as Dunqulah, meeting resistance and finding little wealth. Thus, a treaty known as the baqt was signed between the Arabs and Makuria, and held for some 700 years.
Southern Sudan was home to a variety of semi-nomadic tribes. In the sixteenth century one of these tribes, known as the Funj, moved north and united Nubia forming the Kingdom of Sennar. The Funj sultans quickly converted to Islam and that religion steadily became more entrenched. At the same time, the Darfur Sultanate arose in the west. Between them, the Taqali established a state in the Nuba Hills. In 1820–1821, an Ottoman force conquered and unified the northern portion of the country. Ibrahim Pasha (1789–1848), the adopted son of Muhammad Ali, the ruler of Egypt, founded Khartoum in 1821 as an outpost for the Egyptian army, and the seat of Egyptian rule in Sudan. The location at the confluence of the White and Blue Nile meant the settlement grew as a regional center of trade, including the slave trade. By 1840, its population was 30,000. The town was an unplanned agglomeration of dirty mud buildings interspersed with native thatched huts.
Ismail Pasha, the khedive of Egypt from 1863-1879, attempted to extend Egyptian rule to the south, bringing in the British influence. The Egyptians developed Sudan’s trade in ivory and slaves. During the 1870s, European initiatives against the slave trade caused an economic crisis in southern Sudan.
In 1881, a religious leader named Muhammad ibn Abdalla (1844–1885) proclaimed himself the Mahdi ("guided one") and began a war to unify the tribes in western and central Sudan. Troops loyal to the Mahdi Muhammad Ahmad began a siege of Khartoum on March 13, 1884, against the defenders led by British General Charles George Gordon (1833–1885). The siege resulted in the massacre of the Anglo-Egyptian garrison. The heavily damaged city fell to the Mahdists on January 26, 1885. The Mahdists set up their capital in Omdurman, which was the scene of the bloody battle on September 2, 1898, during which British forces under Horatio Kitchener defeated the Mahdist forces defending the city. In 1899, Sudan was proclaimed a condominium under British-Egyptian administration, and Khartoum became the capital. The town was laid out, for military purposes, in a series of patterns resembling the Union Jack British flag. At that time, the smaller town of Khartoum North, on the Blue Nile opposite Khartoum, began to grow as an arsenal and storehouse. From 1898, the United Kingdom and Egypt administered all of present day Sudan, but northern and southern Sudan were administered as separate colonies. Most of the British focus was on developing the economy and infrastructure of the north.
In 1943, the British began preparing the north for self-rule, establishing a North Sudan Advisory Council to advise on the governance of the six North Sudan provinces: comprising of Khartoum, Kordofan, Darfur, and Eastern, Northern and Blue Nile provinces. Then, in 1946, the British colonial authority reversed its policy and decided to integrate north and south Sudan under one government. South Sudanese authorities were informed at the Juba Conference of 1947 that they would now be governed by a common administrative authority with the north. Many southerners felt betrayed by the British because they were largely excluded from the new government.
Sudan achieved independence on January 1, 1956, under a provisional constitution, with Khartoum the capital. However, the Arab-led Khartoum government reneged on promises to create a federal system. Southern army officers rebelled, sparking 17 years of civil war (1955-1972). In the early period of the war, hundreds of northern bureaucrats, teachers, and other officials serving in the south were massacred. In 1972, the Addis Ababa Agreement led to a cessation of the north-south civil war, allowing a degree of self-rule, causing a 10-year hiatus in the civil war. The Sudanese government became more pro-Western, and made plans to export food and cash crops. However, commodity prices declined throughout the 1970s causing economic problems for Sudan.
In 1973, Khartoum was the site of a hostage crisis in which members of Black September held 10 hostages at the Saudi embassy, five of whom were diplomats. The U.S. ambassador, the U.S. deputy ambassador, and the Belgian chargé d'affaires were murdered. The remaining hostages were released. The first oil pipeline between Khartoum and Port Sudan was completed in 1977.
Throughout the 1970s and 1980s, Khartoum was the destination for hundreds of thousands of refugees fleeing conflicts in neighboring nations such as Chad, Eritrea, Ethiopia and Uganda. The refugees settled in large slums at the outskirts of the city. From the mid-1980s onward, large numbers of internally displaced people from the violence of the Second Sudanese Civil War and Darfur conflict have settled around Khartoum. In 1983, the civil war was reignited following President Gaafar Nimeiry’s decision to circumvent the Addis Ababa Agreement, by attempting to create a Federated Sudan including states in Southern Sudan. The government's Islamization policy which would have instituted Islamic law, among other things. The second civil war went on for more than 20 years, resulting in the deaths of 2.2 million Christians and Animists. It displaced roughly 4.5 million people within Sudan and into neighboring countries. It also damaged Sudan’s economy leading to food shortages resulting in starvation and malnutrition. Following the 1998 U.S. embassy bombings, the United States accused Osama bin Laden's al-Qaeda group of responsibility and launched cruise missile attacks (August 20) on the al-Shifa pharmaceutical factory in Khartoum North. The destruction of the factory produced diplomatic tension between the U.S. and Sudan. The Naivasha peace treaty was signed on January 9, 2005, in Nairobi, granting Southern Sudan autonomy for six years, followed by a referendum about independence. The United Nations Mission In Sudan was established in March 24, 2005, to support implementation of the Comprehensive Peace Agreement. After the sudden death of Sudan People's Liberation Army head and vice-president of Sudan John Garang at the end of July 2005, there were riots in the capital for days, leaving 24 dead. On May 10, 2008, a Darfur rebel group known as the Justice and Equality Movement battled Sudanese government forces in Khartoum in a bid to topple Omar Hassan al-Bashir's government. The Sudanese government repelled the assault.