Ancient Egypt: 3150 BC - 305 BC.
Ptolemaic Egypt: 305 BC - 30 BC.
The Ptolemaic Kingdom was founded in 305 BC by Ptolemy I Soter, a Macedonian general, after the death of Alexander the Great. It survived for a long time, until the Roman Civil War, where Queen Cleopatra supported Mark Antony instead of the eventual winner, Octavian.
Mark Antony gave Egypt Tarsus, Cyrene, Crete, Cyprus, and Israel, but this made the Roman Senate support Octavian instead. Octavian, the new Roman Emperor, officially absorbed Egypt into the Roman Empire on 30 BC. However, Egypt was similar to a Roman protectorate, because dynastic quarrels left Egypt so weakened that the country became a de facto protectorate of Rome, which had by now absorbed most of the Greek world.
Roman Egypt: 30 BC–390 AD
The first prefect (governor) of Aegyptus, Gaius Cornelius Gallus, put Upper Egypt under Roman control by force of arms, established a protectorate over the southern frontier district. Under Antoninus Pius, however, oppressive taxation led to a revolt in 139, of the native Egyptians, which was suppressed only after several years of fighting. This Bucolic War, led by one Isidorus, caused great damage to the economy and marked the beginning of Egypt's economic decline.
Avidius Cassius, who led the Roman forces in the war, declared himself emperor in 175, and was acknowledged by the armies of Syria and Aegyptus. On the approach of Marcus Aurelius, however, he was deposed and killed and the clemency of the emperor restored peace. A similar revolt broke out in 193, when Pescennius Niger was proclaimed emperor on the death of Pertinax.
The Emperor Septimius Severus gave a constitution to Alexandria and the provincial capitals in 202. There was a series of revolts, both military and civilian, through the 3rd century. Under Decius, in 250, the Christians again suffered from persecution, but their religion continued to spread.
The prefect of Aegyptus in 260, Mussius Aemilianus, first supported the Macriani, Gallienus usurpers, and later, in 261, become a usurper himself, but was defeated by Gallienus. Later, after the split of east and west Rome, Egypt became part of the Byzantine Empire, from 380 AD – c. 642 AD.
Mamluk Egypt: 1250 AD–1517 AD
It lasted from the overthrow of the Ayyubid Dynasty until the Ottoman conquest of Egypt in 1517. The sultanate's ruling caste was composed of Mamluks, soldiers of predominantly Kipchak/Cuman, Georgian and Circassian slave origin.While Mamluks were purchased, their status was above ordinary slaves, who were not allowed to carry weapons or perform certain tasks. Mamluks were considered to be "true lords", with social status above freeborn Egyptian Muslims. It declined towards the end of its existence, and was conquered by the Ottoman Empire in 1517.
Ottoman Egypt: 1517 AD–1867 AD
Egypt under the Muhammad Ali dynasty remained nominally an Ottoman province. The Battle of the Pyramids during the Napoleonic Wars largely changed that. It was granted the status of an autonomous vassal state or Khedivate in 1867.
Isma'il and Tewfik Pasha governed Egypt as a quasi-independent state under Ottoman suzerainty until the British occupation of 1882, and it was technically a British colony. Nevertheless, the Khedivate of Egypt (1867–1914) remained a de jure Ottoman province until 5 November 1914, when it was declared a British protectorate in reaction to the Ottoman Empire's decision to join the First World War on the side of the Central Powers.