Ancient Egypt was an ancient civilization of eastern North Africa, concentrated along the lower reaches of the Nile River in what is now the modern country of Egypt. It was part of a larger complex of civilizations, the Nile Valley Civilizations, of which regions south of Egypt (in today's Sudan, Eritrea, Somalia, and Ethiopia) are a part. Egyptian civilization coalesced around 3150 BC with the political unification of Upper and Lower Egypt under the first pharaoh, and it developed over the next three millennia. Its history occurred in a series of stable Kingdoms, separated by periods of relative instability known as Intermediate Periods. Ancient Egypt reached its pinnacle during the New Kingdom, after which it entered a period of slow decline. Egypt was conquered by a succession of foreign powers in this late period. The rule of the pharaohs officially ended in 31 BC when Egypt fell to the Roman Empire and became a Roman province.
The success of ancient Egyptian civilization stemmed partly from its ability to adapt to the conditions of the Nile River Valley. The predictable flooding and controlled irrigation of the fertile valley produced surplus crops, which fueled social development and culture. With resources to spare, the administration sponsored mineral exploitation of the valley and surrounding desert regions, the early development of an independent writing system, the organization of collective construction and agricultural projects, trade with surrounding regions, and a military intended to defeat foreign enemies and assert Egyptian dominance. Motivating and organizing these activities was a bureaucracy of elite scribes, religious leaders, and administrators under the control of a pharaoh who ensured the cooperation and unity of the Egyptian people in the context of an elaborate system of religious beliefs