Few civilizations have left such an indelible mark on history as that of ancient Egypt. Though the first settlers of the Nile valley are thought to have arrived as early as 7000 BC, it wasn't until the legendary king Menes unified Upper and Lower Egypt that the region began to develop a cohesive sense of culture and identity. This First Dynasty (2925-2775 BC), with its capital at Memphis, was followed by 26 more over the next 2700 years. Writing was the major instrument in the centralization and self-preservation of Egypt. The two basic forms of writing, hieroglyphs and the cursive form known as hieratic (used on papyrus), were invented at much the same time in late pre-dynastic Egypt (about 3000 BC). Writing was used chiefly for administration and until about 2650 BC no continuous texts were recorded; the only literary texts written down before the early Middle Kingdom (1950 BC) seem to have been lists of religious practices and medical treatises. Another strength was the Egyptian religion, which was one of the most enduring of the ancient world, through which Egypt became a highly stratified, highly efficient society. Egypt's economic strength allowed for the support of a priestly class, who were tasked with the spiritual well being of the people yet able to devote their time to the study of religion, astronomy, philosophy, and mathematics. The priesthood also served the functions of a state bureaucracy, carrying out the edicts of the Pharaoh and managing his financial and diplomatic affairs. The great organizational and economic power of Egypt allowed the rulers to accomplish unmatched works of construction. The Great Pyramids of Giza, completed in the Fourth Dynasty (2575-2465 BC), still stand as one of mankind's most impressive feats of engineering and logistics.
Prior to 1700 BC, no outsiders had ever held dominion over Egypt. That changed when the Hyksos, a Semitic people, overran Lower Egypt. Thereafter, Egypt's borders were defended by capable Libyan warriors and the elite often rode into battle in War Chariots, which were able to use speed to outflank opponents and break up organized formations of troops. It was under the rule of Hatshepsut, a woman who managed to exercise power despite the prohibition that the pharaoh must be male, that the Hyksos were driven out of the country through the use of such chariots. Egypt's greatest military strength, however, lay in the employment of mercenaries from Macedonia, Greece, Nubia and many other neighboring peoples - Egyptian gold was always their most valuable military asset. However, this was not enough to guarantee the isolation of the richest land in the Mediterranean world. Egypt fell to the Assyrians, and then to the Persians yet even during the plunder of Xerxes' governors, Egyptian culture and religion survived. Alexander the Great liberated the Egyptians from Persian rule in 332 BC and established the city of Alexandria, which was to become the new capital of Hellenic Egypt under the rule of the Macedonian Ptolemaic dynasty (332-30 BC), the last Egyptian kingdom. The kingdom was one of several that emerged in the aftermath of Alexander's death and the struggles of his successors. It was the wealthiest, however, and for much of the next 300 years, the most powerful politically and militarily.
The able Ptolemies ruled in an unbroken line until the death of Cleopatra VII in 30 BC. Her suicide marked the end of Pharaonic rule and the beginning of Egypt's centuries as a Roman and Byzantine province. Although swept by the Islamic tide in 642 AD, Egypt was to remain under foreign occupation - Arabic, Ottoman, French, and British - until after World War I, when she finally gained her independence from a British administration weary of overseas conflict. From 1922 through 1952, Egypt appeared to be one of the world's most successful constitutional monarchies. But it was ripe for revolution; the military coup of July 1952 led by Gamal Nasser, ironically, finally made Egypt an island of stability in a turbulent Middle East.