The modern Republic of Sudan was formed in 1956 and inherited its boundaries from Anglo-Egyptian Sudan, established in 1899. For times predating 1899, usage of the term "Sudan" for the territory of the Republic of Sudan was somewhat anachronistic, and may have referred to the more diffuse concept of the Sudan.
The early history of the Kingdom of Kush, located along the Nile region in what is now northern Sudan, is intertwined with the history of ancient Egypt, which it was politically allied with over several ruling periods. By virtue of its proximity to Egypt, the Sudan participated in the wider history of the Near East, with the most popular episodes being the 25th dynasty and the Christianization of the three Nubian kingdoms Nobatia, Makuria and Alodia in the sixth century. As a result of Christianization, the Old Nubian language stands as the oldest recorded Nilo-Saharan language (earliest records dating to the eighth century) in an adaptation of the Coptic alphabet). While Islam was already present in the Sudanese Red Sea coast and the adjacent territories since the 7th century, the Nile Valley did not undergo formal Islamization until the 14th-15th century, following the decline of the Christian kingdoms. The kingdoms were succeeded by the Sultanate of Sennar in the early 16th century, which controlled large parts of the Nile Valley and the Eastern Desert, while the kingdoms of Darfur controlled the western part of Sudan. Two small kingdoms arose in the southern regions, the Shilluk Kingdom of 1490, and Taqali of 1750, near modern-day South Sudan, but both northern and southern regions were soon seized by Muhammad Ali of Egypt during the 1820s. Resentment toward the oppressive rule of Muhammad Ali and his immediate successors is credited for stirring up resentment toward the Turco-Egyptian rulers that contributed to the Sudanese struggle for independence led by Muhammad Ahmad in 1881.
Since its independence in 1956, the history of Sudan has been plagued by internal conflict, viz. the First Sudanese Civil War (1955–1972), the Second Sudanese Civil War (1983–2005), culminating in the secession of South Sudan on 9 July 2011, and the War in Darfur (2003–2010)
By the seventh millennium BC, people of a Neolithic culture had settled into a sedentary way of life there in fortified mud-brick villages, where they supplemented hunting and fishing on the Nile with grain gathering and cattle herding. During the fifth millennium BC migrations from the drying Sahara brought neolithic people into the Nile Valley along with agriculture. The population that resulted from this cultural and genetic mixing developed social hierarchy over the next centuries become the Kingdom of Kush (with the capital at Kerma) at 1700 BC. Anthropological and archaeological research indicate that during the predynastic period Nubia and Nagadan Upper Egypt were ethnically, and culturally nearly identical, and thus, simultaneously evolved systems of pharaonic kingship by 3300 BC. Together with other countries on Red Sea, Sudan is considered the most likely location of the land known to the ancient Egyptians as Punt (or "Ta Netjeru", meaning "God's Land"), whose first mention dates to the 25th century BC.
Northern Sudan's earliest historical record comes from ancient Egyptian sources, which described the land upstream as Kush, or "wretched." For more than two thousand years the Old Kingdom of Egypt (c.2700–2180 BC), had a dominating and significant influence over its southern neighbour, and even afterward, the legacy of Egyptian cultural and religious introductions remained important.
Over the centuries, trade developed. Egyptian caravans carried grain to Kush and returned to Aswan with ivory, incense, hides, and carnelian (a stone prized both as jewellery and for arrowheads) for shipment downriver. Egyptian governors particularly valued gold in Nubia and soldiers in the pharaoh's army. Egyptian military expeditions penetrated Kush periodically during the Old Kingdom. Yet there was no attempt to establish a permanent presence in the area until the Middle Kingdom (c.2100–1720 BC), when Egypt constructed a network of forts along the Nile as far south as Samnah in Lower Egypt to guard the flow of gold from mines in Wawat, the area between the First and Second Cataracts.
Around 1720 BC, Canaanite nomads called the Hyksos took over Egypt, ended the Middle Kingdom, severed links with Kush, and destroyed the forts along the Nile River. To fill the vacuum left by the Egyptian withdrawal, a culturally distinct indigenous Kushite kingdom emerged at al-Karmah, near present-day Dongola. After Egyptian power revived during the New Kingdom (c.1570–1100 BC), the pharaoh Ahmose I incorporated Kush as an Egyptian ruled province governed by a viceroy. Although Egypt's administrative control of Kush extended only down to the Fourth Cataract, Egyptian sources list tributary districts reaching to the Red Sea and upstream to the confluence of the Blue Nile and White Nile rivers. Egyptian authorities ensured the loyalty of local chiefs by drafting their children to serve as pages at the pharaoh's court. Egypt also expected tribute in gold and slaves from local Kushite chiefs.