How many foreign dynasties ruled ancient Egypt?
According to the tradition codified by the third-century BCE Egyptian priest and historian Manetho, ancient Egyptian kings and queens belonged to 30 distinct dynasties. Out of the 30, four dynasties were foreign: the Hyksos (Dynasty 15: 16th century BCE), Libyans (Dynasty 22: tenth–eighth centuries), Nubians or Kushites (Dynasty 25: eighth–seventh centuries), and Persians (Dynasty 27: sixth–fifth centuries, and again in the fourth century).
Manetho did not count the contemporary, Ptolemaic rulers of Egypt as a distinct dynasty. However, since Alexander the Great and his successors presented themselves as true pharaohs, two more dynasties can be added to this list. The first is the Macedonian dynasty of the Argeads (or Temenids) that conquered Egypt in 332 BCE, and the second is the Ptolemaic dynasty of Alexander’s successors that held Egypt until 31 BCE, when Cleopatra VII and Marc Antony lost to Octavian, who then became the first Roman emperor to rule Egypt. Although early Roman rulers of Egypt were honored and portrayed as pharaohs, modern scholars consider their dynasties to be outside of Egypt’s pharaonic history.