The Ptolemaic Kingdom was founded in 305 BC by Ptolemy I Soter, who declared himself Pharaoh of Egypt and created a powerful Hellenistic dynasty that ruled an area stretching from southern Syria to Cyrene and south to Nubia. Scholars also argue that the kingdom was founded in 304 BC because of different use of calendars: Ptolemy crowned himself in 304 BC on the ancient Egyptian calendar, but in 305 BC on the ancient Macedonian Calendar; to resolve the issue, the year 305/4 was counted as the first year of Ptolemaic Kingdom in the demotic papyri. Alexandria became the capital city and a major center of Greek culture and trade. To gain recognition by the native Egyptian populace, they named themselves the successors to the Pharaohs. The later Ptolemies took on Egyptian traditions by marrying their siblings, had themselves portrayed on public monuments in Egyptian style and dress, and participated in Egyptian religious life. The Ptolemies were involved in foreign and civil wars that led to the decline of the kingdom and its final annexation by Rome. Hellenistic culture continued to thrive in Egypt throughout the Roman and Byzantine periods until the Muslim conquest.
The era of Ptolemaic reign in Egypt is one of the best-documented time periods of the Hellenistic Era; a wealth of papyri written in Greek and Egyptian of the time have been discovered in Egypt.
In 332 BC, Alexander the Great, King of Macedon invaded the Achaemenid satrapy of Egypt. He visited Memphis, and traveled to the oracle of Amun at the Oasis of Siwa. The oracle declared him to be the son of Amun. He conciliated the Egyptians by the respect he showed for their religion, but he appointed Macedonians to virtually all the senior posts in the country, and founded a new Greek city, Alexandria, to be the new capital. The wealth of Egypt could now be harnessed for Alexander's conquest of the rest of the Persian Empire. Early in 331 BC he was ready to depart, and led his forces away to Phoenicia. He left Cleomenes as the ruling nomarch to control Egypt in his absence. Alexander never returned to Egypt.
Following Alexander's death in Babylon in 323 BC, a succession crisis erupted among his generals. Initially, Perdiccas ruled the empire as regent for Alexander's half-brother Arrhidaeus, who became Philip III of Macedon, and then as regent for both Philip III and Alexander's infant son Alexander IV of Macedon, who had not been born at the time of his father's death. Perdiccas appointed Ptolemy, one of Alexander's closest companions, to be satrap of Egypt. Ptolemy ruled Egypt from 323 BC, nominally in the name of the joint kings Philip III and Alexander IV. However, as Alexander the Great's empire disintegrated, Ptolemy soon established himself as ruler in his own right. Ptolemy successfully defended Egypt against an invasion by Perdiccas in 321 BC, and consolidated his position in Egypt and the surrounding areas during the Wars of the Diadochi (322–301 BC). In 305 BC, Ptolemy took the title of King. As Ptolemy I Soter ("Saviour"), he founded the Ptolemaic Dynasty that was to rule Egypt for nearly 300 years.
All the male rulers of the dynasty took the name "Ptolemy," while princesses and queens preferred the names Cleopatra, Arsinoe and Berenice. Because the Ptolemaic kings adopted the Egyptian custom of marrying their sisters, many of the kings ruled jointly with their spouses, who were also of the royal house. This custom made Ptolemaic politics confusingly incestuous, and the later Ptolemies were increasingly feeble. The only Ptolemaic Queens to officially rule on their own were Berenice III and Berenice IV. Cleopatra V did co-rule, but it was with another female, Berenice IV. Cleopatra VII officially co-ruled with Ptolemy XIII Theos Philopator, Ptolemy XIV, and Ptolemy XV, but effectively, she ruled Egypt alone.