The Ptolemaic Kingdom was an Ancient Greek state based in Egypt during the Hellenistic Period. It was founded in 305 BC by Ptolemy I Soter, a companion of Alexander the Great, and lasted until the death of Cleopatra VII in 30 BC. Ruling for nearly three centuries, the Ptolemies were the longest and most recent Egyptian dynasty of ancient origin.
Alexander the Great conquered Persian-controlled Egypt in 332 BC during his campaigns against the Achaemenid Empire. After Alexander's death in 323 BC, his empire quickly unraveled amid competing claims by the diadochi, his closest friends and companions. Ptolemy, a Macedonian who was one of Alexander's most trusted generals and confidants, won control of Egypt from his rivals and declared himself pharaoh. 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.