The Ptolemaic Kingdom (/ˌtɒlɪˈmeɪ.ɪk/; Koine Greek: Πτολεμαϊκὴ βασιλεία, Ptolemaïkḕ basileía) or Ptolemaic Empire was an ancient Greek polity based in Egypt during the Hellenistic period. It was founded in 305 BC by the Macedonian Greek general Ptolemy I Soter, a companion of Alexander the Great, and ruled by the Ptolemaic dynasty until the death of Cleopatra VII in 30 BC. Reigning for nearly three centuries, the Ptolemies were the longest and final dynasty of ancient Egypt, heralding a distinct era of religious and cultural syncretism between Greek and Egyptian culture.
Alexander the Great conquered Egypt in 332 BC during his campaigns against the Achaemenid Empire. Alexander's death in 323 BC was followed by the rapid unraveling of the Macedonian Empire amid competing claims by the diadochi, his closest friends and companions. Ptolemy, one of Alexander's most trusted generals and confidants, won control of Egypt from his rivals and declared himself its ruler in 305 BC. Alexandria, a Greek polis founded by Alexander, became the capital city and a major center of Greek culture, learning, and trade for the next several centuries. Following the Syrian Wars with the Seleucid Empire, a rival Hellenistic state, the Ptolemaic Kingdom expanded its territory to include eastern Libya, the Sinai, and northern Nubia.