Scant archaeological evidence of Predynastic Egypt exists from 9000 BC to 6000 BC. At the end of the Pleistocene Period in the Nile Region, temperate conditions made for an ideal environment for the birth of a highly specialized Neolithic society between 7000 B.C. and 3200 B.C.. Continued expansion of the desert forced the early ancestors of the Egyptians to settle around the Nile more permanently, and adopt a more sedentary lifestyle during the Neolithic. Around 6000 BC, Neolithic settlements existed throughout Egypt. Studies have determined these settlements were founded by people from the Fertile Crescent in the Near East, moving to the area during the Egyptian and North African Neolithic and bringing farming to the region.
The Neolithic Fayum farming societies of Egypt cultivated emmer wheat and flax for cloth production. They grew their crops by the lake in the Fayum depression, hence the name for their tool culture. The Fayum peoples also raised and herded goat, sheep, pig and cattle. Their living quarters left no trace in some regions but were likely made from reeds or skins over a light frame. Wattle-and-daub villages have also been attributed to these peoples. The Fayum society represents the oldest evidence of food production from the Nile dating back to 4400 B.C.. As time progressed, the farming villages gave way to cities and kingdoms, ushering in the famous ancient Egyptian Dynasties.
Ancient Egyptian civilization followed prehistoric Egypt and coalesced around 3100 BC with the political unification of Upper and Lower Egypt under Menes. The history of ancient Egypt occurred as a series of stable kingdoms, separated by periods of relative instability known as Intermediate Periods: the Old Kingdom of the Early Bronze Age, the Middle Kingdom of the Middle Bronze Age and the New Kingdom of the Late Bronze Age.
Egypt reached the pinnacle of its power during the New Kingdom, ruling much of Nubia and a sizable portion of the Levant, after which it entered a period of slow decline. During the course of its history, Egypt was invaded or conquered by a number of foreign powers, including the Hyksos, the Nubians, the Assyrians, the Achaemenid Persians, and the Macedonians under Alexander the Great. The Greek Ptolemaic Kingdom, formed in the aftermath of Alexander's death, ruled Egypt until 30 BC, when, under Cleopatra, it fell to the Roman Empire and became a Roman province.