The history of Egypt is the longest continuous history, as a unified state, of any country in the world. The Nile valley forms a natural geographic and economic unit, bounded to the east and west by deserts, to the north by the sea and to the south by the Cataracts of the Nile. The need to have a single authority to manage the waters of the Nile led to the creation of the world's first state in Egypt in about 3000 BC. Egypt's peculiar geography made it a difficult country to attack, which is why Pharaonic Egypt was for so long an independent and self-contained state. The Nubians and Hyksos were among the earliest foreign rulers of Egypt, but the ancient Egyptians regained control of their country soon after their invasions. The Neo-Assyrian Empire also controlled Egypt for a while before native Egyptians regained control.
Once Egypt did succumb to foreign rule, however, it proved unable to escape from it, and for 2,400 years, Egypt was governed by a series of foreign powers: the Persians, Macedonians, Romans, Byzantines, Rashidun, Umayyads, Abbasids, Ottomans, French, and British. At certain periods during these 2,400 years, Egypt was independently governed under the Ptolemies, Ikhshidids, Fatimids, Ayyubids, Mamluks and Muhammad Ali. The founders and rulers of these governments, however, were not native to Egypt.
When Gamal Abdel Nasser (President of Egypt) (1954–1970) remarked that he was the first native Egyptian to exercise sovereign power in the country since Pharaoh Nectanebo II, deposed by the Persians in 343 BC, he was exaggerating only slightly.
In this encyclopedia, Egyptian history has been divided into eight periods: