The history of Egypt spans several millennia, dating back to prehistoric times, reaching the peak of the emergence of the first Egyptian civilization. Egypt is one of the world's oldest continuous civilizations. Since the earliest human presence on the Nile valley in the 12th millennium BC, a grain milling culture emerged in the Upper Paleolithic Period. The Tasian and Badarian are one of the earliest known Egyptian cultures, dating back to 4500 BC. Prehistoric Egypt is generally defined as the period from the latter part of the Neolithic period, to the end of the Naqada III period. The Egyptians established their civilization and named their country Kemet, meaning the black land, in honor of the dark, fertile soil left behind by the annual flooding of the Nile. Egypt was unified by King Narmer around 3150 BC, establishing the First dynasty, with Memphis as the capital. According to Egyptian chronology, the Old Kingdom (c. 2686–2181 BC) was Egypt’s first golden age, spanning the Third through Sixth dynasties. It was ruled by prominent pharaohs, and established the concept of divine kingship and is renowned as the "Age of the Pyramids".

The Middle Kingdom (c. 2181–1650 BC) spanned the Eleventh, Twelfth, and early Thirteenth dynasties, with Thebes becoming the capital of Egypt for the first time around 2055 BC. This period of Egyptian history is known as a time of reunification and revival of Egypt after the political fragmentation of the First Intermediate Period. The New Kingdom (c. 1570–1069 BC), also known as the Egyptian Empire, began after the expulsion of the Hyksos, marking the end of the Second Intermediate Period. The Egyptian Empire lasted for half a millennium, during the reigns of the Eighteenth, Nineteenth, and the Twentieth dynasties, Egypt strengthened its borders and expanded its sphere of influence through military victories over other powers, such as Canaan, Mitanni, Cyprus, Hittites, and the Sea Peoples. In the Late Period (c. 664–332 BC), Egypt was invaded by the Achaemenid Empire in the 5th century BC, was expelled in the following century, and then reoccupied it in the 4th century BC. The Macedonian Empire expelled the Persians from Egypt, leading to the establishment of the Ptolemaic Kingdom. Later, the Roman Empire conquered Egypt in the 1st century BC.

In Classical antiquity, Egypt witnessed a series of Egyptian resistance movements and armed conflicts against foreign rule. Some of these movements succeeded in controlling parts of Egypt at different historical periods, but without achieving the complete liberation of all Egyptian lands. In the early Middle Ages, the Islamic conquest of Egypt in the 7th century AD marked the beginning of the Islamization of Egypt and a transformation of its religious landscape. Egyptian national identity remained strong and preserved under foreign rule, allowing it to continue to develop. The Tulunid dynasty established the first autonomous, self-governing Egyptian state (868-905) since the Ptolemaic Kingdom. It broke away from the central Abbasid Caliphate for a brief period, exempting Egypt from paying tribute. The newly established state launched successful military campaigns against the Byzantine Empire, capturing Cyprus for a brief period, while the Ikhshidid dynasty (935-969) exercised local authority with allegiance to the Abbasid Caliphate. Cairo was founded in 969, became the new Egyptian capital and the seat of the Fatimid Caliphate in 972. In subsequent centuries, Egypt was a pivotal beacon of knowledge and progress in the Islamic world, excelling in astronomy, medicine, mathematics, history and Egyptology.

The Sultanate of Egypt (1171-1250) was founded by the Ayyubid dynasty, and witnessed a flourishing science and culture, and launched successful military campaigns against the Crusaders. The Mamluk era (1250–1517) is recognized as an important time in Egypt's history by scholars. Egypt emerged as a global trading power linking the Mediterranean Sea to the Indian Ocean, and the economic growth helped strengthen the sultanate's army which achieved numerous military victories over the Crusaders, and the Mongol Empire. Egypt joined the Ottoman Empire in 1517, and later, in the early 19th century, it embarked on a comprehensive modernization project, during which it gained de facto independence from Ottoman rule, and rebuilt the Egyptian army. This period witnessed various successful military campaigns against the Ottoman Empire. Controlled by Britain in the late 19th century, Egypt gained independence in 1922. Later, the Egyptian revolution of 1952, resulted in abolishing the monarchy, and Egypt became a republic in 1953. The Republic of Egypt has moved from an era of army-led socialism and Pan-Arabism to economic liberalization, leading up to the modern semi-presidential system.

Prehistoric Egypt (pre-3150 BC)

thumb|Artifacts of Egypt from the prehistoric period, from 4400 to 3100 BC. First row from top left: a [[Badari culture|Badarian ivory figurine, a Naqada II jar, a Bat figurine. Second row: a diorite vase, a flint knife, a cosmetic palette.]]

There is evidence of petroglyphs along the Nile terraces and in desert oases. In the 10th millennium BC, a culture of hunter-gatherers and fishermen was replaced by a grain-grinding culture. Climate changes and/or overgrazing around 6000 BC began to desiccate the pastoral lands of Egypt, forming the Sahara. Early tribal peoples migrated to the Nile River, where they developed a settled agricultural economy and more centralized society.

By about 6000 BC, a Neolithic culture had taken root in the Nile Valley. During the Neolithic era, several predynastic cultures developed independently in Upper and Lower Egypt. The Badari culture and the successor Naqada series are generally regarded as precursors to dynastic Egypt. The earliest known Lower Egyptian site, Merimde, predates the Badarian by about seven hundred years. Contemporaneous Lower Egyptian communities coexisted with their southern counterparts for more than two thousand years, remaining culturally distinct, but maintaining frequent contact through trade. The earliest known evidence of Egyptian hieroglyphic inscriptions appeared during the predynastic period on Naqada III pottery vessels, dated to about 3200 BC.

In Upper Egypt, the predynastic Badari culture was followed by the Naqada culture (Amratian), being closely related to the Lower Nubian; other northeast African populations, with some affinities with other coastal communities from the Maghreb, some tropical African groups, and possibly inhabitants of the Middle East. Upper Egypt is considered to have formed the pre-dominant basis for the cultural development of Pharaonic Egypt and the Proto-dynastic kings emerged from the Naqada region.

Historical scholarship has generally regarded the peopling of the Egyptian Nile Valley from archaeological and biological data, to be the result of interaction between coastal northern Africans, "neolithic" Saharans, Nilotic hunters, and riverine proto-Nubians with some influence and migration from the Levant (Hassan, 1988).

As of 2025, the earliest full-genome analysis of an ancient Egyptian is that of Old Kingdom individual (NUE001) (2855–2570 BCE), with implications for the genetic makeup of Early Dynastic Egyptians in general: the study shows that the genetic profile of this individual was most closely represented by a two-source model, in which 77.6% ± 3.8% of the ancestry corresponded to genomes from the Middle Neolithic Moroccan site of Skhirat-Rouazi (SKH, dated to 4780–4230 BCE), itself consisting of predominantly Levant Neolithic ancestry (76.4 ± 4.0%) and minor Iberomaurusian ancestry (22.4 ± 3.8%), with the remaining (22.4% ± 3.8%) most closely related to known genomes from Neolithic Mesopotamia (dated to 9000-8000 BCE).

Dynastic Egypt (3150–332 BC)

Early Dynastic Period and the Old Kingdom

thumb|The [[Great Sphinx of Giza|Great Sphinx and the Pyramids of Giza, built during the Old Kingdom.]]

thumb|The [[Narmer Palette depicts the unification of the Two Lands.]]A unified kingdom was formed in 3150 BC by King Menes, leading to a series of dynasties that ruled Egypt for the next three millennia. Egyptian culture flourished during this long period and remained distinctively Egyptian in its religion, arts, language and customs.

The first two ruling dynasties of a unified Egypt set the stage for the Old Kingdom period (c. 2700–2200 BC). Often cited as the "Age of the Pyramids", the Old Kingdom was an era of stability and centralized power. This era saw the construction of many pyramids, most notably the pyramid of Djoser, constructed during the Third Dynasty and the Giza Pyramids, constructed in the Fourth Dynasty. During the rule of the Fourth Dynasty, ancient Egypt witnessed a golden age of political power; reigned by Sneferu, Khufu, and Khafre. Later, Thebes became the capital of a unified Egypt under King Mentuhotep II in c. 2055 BCE.

First Intermediate Period, the Middle Kingdom and the Second Intermediate Period

The First Intermediate Period ushered in a time of political upheaval for about 150 years. took over much of Lower Egypt around 1650 BC and founded a new capital at Avaris. They were driven out by an Upper Egyptian force led by Ahmose I, who founded the Eighteenth Dynasty and relocated the capital from Memphis to Thebes.

New Kingdom

thumb|New Kingdom in the 15th century BC

Following the expulsion of the Hyksos in c. 1550 BCE under the rule of Ahmose I, ending the Second Intermediate Period, the New Kingdom (c. 1550–1070 BC) began with the Eighteenth Dynasty, marking the rise of Egypt as an international power that expanded during its greatest extension to an empire from Syria to Upper Nubia. This period known as the Egyptian Empire, is noted for some of the most well known Pharaohs, including Hatshepsut, Thutmose III, Akhenaten and his wife Nefertiti, Tutankhamun and Ramesses II. The first historically attested expression of monotheism came during this period as Atenism, although some consider Atenism to be a form of monolatry rather than of monotheism.

The Egyptian Empire lasted for nearly half a millennium, between the 16th century BC and the 11th century BC. Egypt’s military victories, defined its borders and built its empire during the Bronze Age. In 1479 BCE, Hatshepsut broke deep-rooted traditions to reign as a female pharaoh during the 18th Dynasty. Her name translates to "Foremost of Noble Ladies". She guided Egypt through a peaceful golden age of economic wealth, massive building developments, and expanded trade. Followed by Thutmose III, sometimes called Thutmose the Great. He is regarded as one of the greatest warriors, military commanders, and military strategists of all time; as Egypt's preeminent warrior pharaoh and conqueror; and as a dominant figure in the New Kingdom period. He ruled Egypt from 1479 BC until his death on 11 March 1425 BC. Thutmose III conducted between 17 and 20 military campaigns, all victorious, which brought the Egyptian Empire to its peak. He also created the ancient Egyptian navy, the first navy in the ancient world. Historian Richard A. Gabriel called him the "Napoleon of Egypt". Later, the reign of Ramesses II in the 13th century BC witnessed a period of prosperity in Egypt, characterized by major construction projects, secure borders, and growing international trade. His long reign of 66 years benefited from the stability established by his father, Seti I, pushing Egypt to the peak of its cultural and imperial power.

Third Intermediate Period

Frequent contacts with other nations brought new ideas to the New Kingdom. The country was later ruled and invaded by Libyans, Nubians and Assyrians, but native Egyptians eventually drove them out in 664 BC and the reign of Psamtik I (664–610 BCE), and regained control of their country, marking the beginning of the Late Period of Egypt.

Late Period

thumb|Egyptian king [[Psamtik I during the fall of Ashdod in 635 BCE, illustration by Patrick Gray, 1900.]]

In 664 BCE, Egypt was reunified under the reign of Psamtik I (664–610 BCE), and expelled the Assyrian invaders, marking the beginning of the Late Period of Egypt. Necho II worked on expanding Egyptian military influence in the Levant and initiated a canal to link the Nile with the Red Sea. Amasis II introduced a cultural renaissance and a period of economic prosperity. Psamtik III was the last king, was defeated by the Persian king Cambyses II at the Battle of Pelusium.

Achaemenid rule

thumb|upright=0.7|Egyptian soldier of the Achaemenid army, . [[Xerxes I tomb relief.]]

In the sixth century BC, the Achaemenid Empire conquered Egypt. The entire Twenty-seventh Dynasty of Egypt, from 525 BC to 402 BC, save for Petubastis III and possibly Psammetichus IV, was an entirely Persian-ruled period, with the Achaemenid kings being granted the title of pharaoh.

Second Achaemenid conquest

The Thirty-first Dynasty of Egypt, also known as the Second Egyptian Satrapy, was effectively a short-living province of the Achaemenid Empire between 343 BC to 332 BC. After an interval of independence, during which three indigenous dynasties reigned (the 28th, 29th and 30th dynasty), Artaxerxes III (358–338 BC) reconquered the Nile valley for a brief second period (343–332 BC), which is called the Thirty-first Dynasty of Egypt, thus starting another period of pharaohs of Persian origin.

A team led by Johannes Krause managed the first reliable sequencing of the genomes of 90 mummified individuals in 2017. Whilst not conclusive, because of the non-exhaustive time frame and restricted location that the mummies represent, their study nevertheless showed that these Ancient Egyptians "closely resembled ancient and modern Near Eastern populations, especially those in the Levant, and had almost no DNA from sub-Saharan Africa. What's more, the genetics of the mummies remained remarkably consistent even as different powers—including Nubians, Greeks, and Romans—conquered the empire".

Antiquity

Hellenistic period

Ptolemaic Kingdom

thumb|211x211px|The [[Greeks|Greek Ptolemaic queen Cleopatra and her son by Julius Caesar, Caesarion, at the Dendera Temple complex.]]

thumb|left|Ptolemaic Egypt . The green areas were lost to the [[Seleucid Empire thirty five years later.]]

The Ptolemaic Kingdom was a powerful Hellenistic state extending from southern Syria in the east, to Cyrene to the west, and south to the frontier with Nubia. Alexandria became the capital city and a center of Greek culture and trade. To gain recognition by the native Egyptian populace, they named themselves as the successors to the Pharaohs. The later Ptolemies took on Egyptian traditions, had themselves portrayed on public monuments in Egyptian style and dress, and participated in Egyptian religious life.

The last ruler from the Ptolemaic dynasty was Cleopatra VII, who committed suicide following the burial of her lover Mark Antony, who had died in her arms (from a self-inflicted stab wound) after Augustus had captured Alexandria and her mercenary forces had fled.

The Ptolemies faced rebellions of native Egyptians, often caused by rejecting foreign rule, an unwanted regime, and were involved in foreign and civil wars most significantly the Great Egyptian Revolt (205–186 BC) which peaked when rebels seized Upper Egypt and crowned their own Pharaoh, Horwennefer, fracturing the kingdom before the Ptolemaic dynasty ultimately suppressed it in 186 BC. That led to the decline of the kingdom and its annexation by Rome. Nevertheless, Hellenistic culture continued to thrive in Egypt well after the Muslim conquest. The native Egyptian/Coptic culture continued to exist as well (the Coptic language itself was Egypt's most widely spoken language until at least the 10th century).

Roman Egypt

Roman province of Egypt

Egypt quickly became the Empire's breadbasket supplying the greater portion of the Empire's grain in addition to flax, papyrus, glass and many other finished goods. The city of Alexandria became a key trading outpost for the Roman Empire (by some accounts, the most important for a time). Shipping from Egypt regularly reached India and Ethiopia among other international destinations. It was also a leading (perhaps the leading) scientific and technological center of the Empire. Scholars such as Ptolemy, Hypatia, and Heron broke new ground in astronomy, mathematics, and other disciplines. Culturally, the city of Alexandria at times rivaled Rome in its importance.

The Egyptian people resisted Roman rule in different historical junctions, such as the Theban Revolt (c. 30-29 BC), which broke out in the same year Egypt was invaded. The Boucolia marshes (172–173 AD), also known as the Bucolic War, took place in the Nile Delta as a result of Egyptian resentment against foreign occupation. Led by Isidorus, an Egyptian priest, the rebels managed to sack several cities, before the conflict was suppressed by Roman forces. Upper Egypt often enjoyed a degree of de facto independence due to its distance from Alexandria, the power of its local priests, and its effective resistance to Roman rule. In 215, when Emperor Caracalla visited Alexandria, he was met with insults and responded with a massacre that may have killed as many as 20,000 people. Subsequent Egyptian revolts in Busiris and Coptos (293–294), followed by further revolts in 297–298, leading to the devastating Siege of Alexandria, and the Theban Uprisings in the 6th century.

Diocese of Egypt

thumb|upright|The [[Hanging Church of Cairo, first built in the 3rd or 4th century, is one of the most famous Coptic Orthodox churches in Egypt.]]

Christianity reached Egypt relatively early in the evangelist period of the first century (traditionally credited to Mark the Evangelist). Alexandria, Egypt and Antioch, Syria quickly became the leading centers of Christianity. Diocletian's reign marked the transition from the classical Roman to the late antique/Byzantine era in Egypt, when a great number of Egyptian Christians were persecuted. The New Testament had by then been translated into Egyptian. After the Council of Chalcedon in AD 451, a distinct Egyptian Coptic Church was firmly established.

Sassanid Conquest of Egypt

Sasanian Egypt (known in Middle Persian sources as Agiptus) refers to the brief rule of Egypt and parts of Libya by the Sasanian Empire, which lasted from 619 to 629, until the Sasanian rebel Shahrbaraz made an alliance with the Byzantine emperor Heraclius and had control over Egypt returned to him.

Several large-scale, organized nationwide revolts erupted against Byzantine rule in the early seventh century, coinciding with the Islamization of Egypt. Among the most notable of these uprisings against the Arabs were the Bashmurian revolts, in the 8th and 9th centuries. These revolts involved significant military conflicts between 720 and 832, culminating in the establishment of an independent Bashmurian state before the rebellion was ultimately suppressed.

Medieval Egypt (868–1517)

thumb|left|Extent of Egyptian domains under Tulunid Emir [[Khumarawayh, in 893]]

Egypt remained an Islamic state for the next centuries, and was autonomous under the rule of the Tulunid dynasty (868–905). This period of Egyptian history marks Egypt's rise as the first politically autonomous Islamic state since the Ptolemaic Kingdom. Founded by Ahmad ibn Tulun, this era of de facto autonomy effectively made Egypt a sovereign political power, with Al-Qata'i as the new capital of Egypt. The newly established state expanded its territory in the Levant, attacked the Aegean Islands, and captured Cyprus from the Byzantine Empire for a brief period. The Ikhshidid dynasty (935–969), maintained its loyalty to the Abbasids while exercising local authority. With Cairo as the seat of the Islamic Caliphate under the Fatimids, and the founding of the Al-Azhar Mosque and the Al-Azhar University in the 10th century, Egypt became the beacon of knowledge of the Islamic world. This period marked by the emergence of Egyptian science, mathematics, and philosophy. The strength of the Egyptian economy helped in the development of a strong military, achieving several military victories.

thumb|The [[Al-Azhar Mosque and Al-Azhar University, founded in Cairo in 972.|227x227px]]

The Ayyubid dynasty established the Sultanate of Egypt in 1171, following his abolition of the Fatimid Caliphate. Saladin had originally led the Fatimid army against the Crusaders, where he was made vizier. Following the death of his Zengid suzerain Nur al-Din in 1174, Saladin was proclaimed as the first Sultan of Egypt by the Abbasid Caliphate, and rapidly expanded the new sultanate beyond Egypt to encompass most of Syria, in addition to Hejaz, Yemen, northern Nubia, Tripolitania and Upper Mesopotamia. Most of the Crusader states fell to the sultanate after its victory at the Battle of Hattin in 1187, but the Crusaders reconquered the Syrian coastlands in the 1190s. Military campaigns led by Saladin set the general borders and sphere of influence of the sultanate of Egypt for the almost 350 years of its existence.

With the end of the Ayyubid dynasty, the Mamluks, a Turco-Circassian military caste, took control about AD 1250. The Mamluk Sultanate grew powerful and maintained its sovereignty and regional influence. The Battle of Ain Jalut in AD 1260 is considered the most significant battle for Egypt in this period, considered a turning point in history, as it was the first defeat for the Mongol Empire, preventing them from advancing into North Africa, and Europe. Followed by another victory over the Mongols in the Battle of Marj al-Saffar in AD 1303, ending their invasion to the Levant.

By the late 13th century, Egypt linked the Red Sea, India, Malaya, and East Indies, enhancing its economic growth, which in turn helped strengthen the Sultanate's army which achieved numerous victories over the Crusaders, Armenian Kingdom of Cilicia, and the Timurid Empire. The Greek and Coptic languages and cultures went into a steep decline in favor of Arabic culture (though Coptic managed to last as a spoken language until the 17th century and remains a liturgical language today). At its peak during the reign of Al-Nasir Muhammad from 1299 to 1309, the Mamluk Sultanate's territory reached as far as Cilicia and Southern Anatolia in the east. The mid-14th-century Black Death killed about 40% of the population of Egypt. The reign of Qaitbay (1468-1496) brought stability to the region along with economic growth, endorsing the arts and architecture. The Mamluks continued to govern the country until the conquest of Egypt by the Ottomans in 1517, after which it became a province of the Ottoman Empire. In the 17th and 18th centuries, the country came to be ruled increasingly by local pashas rather than Ottoman pashas.

Ottoman Egypt (1517–1805)

thumb|left|Map of Egypt Eyalet, 1609.

After the 15th century, the Ottoman invasion pushed the Egyptian system into decline. The defensive militarization damaged its civil society and economic institutions. The 1784 famine cost it roughly one-sixth of its population.

The brief French invasion of Egypt led by Napoleon Bonaparte began in 1798. The campaign eventually led to the discovery of the Rosetta Stone, creating the field of Egyptology. Despite early victories and an initially successful expedition into Syria, Napoleon and his Armée d'Orient were eventually defeated and forced to withdraw, especially after suffering the defeat of the supporting French fleet at the Battle of the Nile.

Modern Egypt (1805–1953)

thumb|Map of Egyptian territory in the 19th century

The modern era is considered a transformative period for Egypt. It transitioned from Ottoman control into a semi–autonomous state, followed by the autonomous Khedivate, characterized by modernization, wars, large projects and economic development.

The expulsion of the French in 1801 by Ottoman, Mamluk, and British forces was followed by four years of anarchy in which Ottomans, Mamluks, and Albanians — who were nominally in the service of the Ottomans – wrestled for power. Out of this chaos, the commander of the Albanian regiment, Muhammad Ali (Kavalali Mehmed Ali Pasha) emerged as a dominant figure and in 1805 was acknowledged by the Sultan in Istanbul as his viceroy in Egypt; <!--Muhammad Ali's seizure of power -->the title implied subordination to the Sultan but this was in fact a polite fiction: Ottoman power in Egypt was finished and Muhammad Ali, an ambitious and able leader, established a dynasty that was to rule Egypt until the revolution of 1952.

Muhammad Ali Dynasty

Muhammad Ali's primary focus was military: he annexed Northern Sudan (1820–1824), Syria (1833), and parts of Arabia and Anatolia; but in 1841 the European powers, fearful lest he topple the Ottoman Empire itself, forced him to return most of his conquests to the Ottomans. He kept the Sudan and his title to Egypt was made hereditary. A more lasting result of his military ambition is that it required him to modernize the country. Eager to adopt the military (and therefore industrial) techniques of the great powers, he sent students to the West and invited training missions to Egypt. He built industries, a system of canals for irrigation and transport, and reformed the civil service.

The introduction in 1820 of long-staple cotton, the Egyptian variety of which became notable, transformed its agriculture into a cash-crop monoculture before the end of the century. The social effects of this were enormous: land ownership became concentrated and many foreigners arrived, shifting production towards international markets.

Muhammad Ali was succeeded briefly by his son Ibrahim (in September 1848), then by a grandson Abbas I (in November 1848), then by Said (in 1854), and Isma'il (in 1863).

<!--In 1866, the Assembly of Delegates was founded to serve as an advisory body for the Government. Members of the Assembly were elected from across Egypt and came to have an important influence on Government decisions. That's hogwash, the assembly had almost no power and rarely met-->

Abbas I was cautious. Said and Ismail were ambitious developers, but they spent beyond their means. The Suez Canal, built in partnership with the French, was completed in 1869. The cost of this and other projects had two effects: it led to enormous debt to European banks, and caused popular discontent because of the onerous taxation it required. In 1875, Ismail sold Egypt's 44% share in the canal to the British Government.

Ismail also tried to conquer the Ethiopian Empire and was defeated twice at Gundet in 1875 and again at the Battle of Gura in 1876.

Within three years this led to the imposition of British and French controllers who sat in the Egyptian cabinet, and, "with the financial power of the bondholders behind them, were the real power in the Government."

Urabi revolt and Anglo-Egyptian war

Local dissatisfaction with Ismail and with European intrusion led to the formation of the first nationalist groupings in 1879, with Ahmad Urabi a prominent figure. In 1882 he became head of a nationalist-dominated ministry committed to democratic reforms including parliamentary control of the budget. Fearing a reduction of their control, Britain and France intervened militarily, bombarding Alexandria and crushing the Egyptian army at the battle of Tel el-Kebir. They reinstalled Ismail's son Tewfik as the figurehead of a de facto British protectorate.

After the 1882 Anglo-Egyptian War, the dynasty became a British puppet. British indirect rule lasted from 1882, when the British succeeded in defeating the Egyptian Army at Tel el-Kebir in September and took control of the country.

In 1906, the Dinshaway Incident prompted many neutral Egyptians to join the nationalist movement.

British Protectorate (1914–1922)

In 1914, the Protectorate was made official, and the Ottoman Empire no longer had a role. The title for the head of state, which in 1867 had changed from pasha to khedive, was changed again to sultan. Abbas II was deposed as khedive and replaced by his uncle, Hussein Kamel, as sultan.

Independence

thumb|upright|Nationalists demonstrating in [[Cairo, during the 1919 Egyptian revolution]]

After the First World War, Saad Zaghlul and the Wafd Party led the Egyptian nationalist movement to a majority at the local Legislative Assembly. When the British exiled Zaghlul and his associates to Malta on 8 March 1919, the country arose in its first modern revolution. The revolt led the UK government to issue a unilateral declaration of Egypt's independence on 22 February 1922.

The early 1920s in Egypt was characterized by Egyptianization through the establishment of several national entities such as; Banque Misr. Aiming for financial independence and building national economy, this era laid the beginning for modern Egyptian capitalism and the rise of a politically engaged middle class. Led by pioneering economist Talaat Harb, Banque Misr became the first fully Egyptian-owned and operated bank, conducting all transactions in Arabic and restricting share ownership exclusively to Egyptian citizens, the bank was established to fund industrial rather than agricultural growth. It generated a massive network of enterprises, including the Misr Spinning and Weaving Company, Misr Airwork (later Egyptair), and the Misr Film Industry (Studio Misr).

The new government drafted and implemented a constitution in 1923 based on a parliamentary system. Saad Zaghlul was popularly elected as Prime Minister of Egypt in 1924. In 1936, the Anglo-Egyptian Treaty was concluded. Continued instability due to remaining British influence and increasing political involvement by the king led to the dissolution of the parliament in a military coup d'état known as the 1952 Revolution. The Free Officers Movement forced King Farouk to abdicate in support of his son Fuad. British military presence in the Suez Canal area lasted until 1954, when British troops were expelled.

Republican Egypt (since 1953)

On 18 June 1953, the Egyptian Republic was declared, with General Muhammad Naguib as the first President of the Republic. Naguib was forced to resign in 1954 by Gamal Abdel Nasserthe real architect of the 1952 movementand was later put under house arrest.

Nasser era

thumb|Gamal Abdel Nasser|218x218px

Nasser assumed power as president in June 1956. British forces completed their withdrawal from the occupied Suez Canal Zone on 13 June 1956. He nationalized the Suez Canal on 26 July 1956, prompting the 1956 Suez Crisis.

In 1958, Egypt and Syria formed a sovereign union known as the United Arab Republic. The union was short-lived, ending in 1961 when Syria seceded, thus ending the union. During most of its existence, the United Arab Republic was also in a loose confederation with North Yemen (the Mutawakkilite Kingdom of Yemen) known as the United Arab States.

In the 1967 Six-Day War, Israel invaded and occupied Egypt's Sinai Peninsula and the Gaza Strip, which Egypt had occupied since the 1948 Arab–Israeli War. Three years later (1970), President Nasser died and was succeeded by Anwar Sadat.

Sadat era

thumb|170px|[[Anwar Sadat|Anwar Al Sadat]]

Sadat switched Egypt's Cold War allegiance from the Soviet Union to the United States, expelling Soviet advisors in 1972. He launched the Infitah economic reform policy, while clamping down on religious and secular opposition.

In 1973, Egypt, along with Syria, launched the Yom Kippur War, a surprise attack against the Israeli forces occupying the Sinai Peninsula and the Golan Heights. It was an attempt to regain part of the Sinai territory that Israel had captured six years earlier. Sadat hoped to seize some territory through military force, and then regain the rest of the peninsula by diplomacy. The conflict sparked an international crisis between the US and the USSR, both of whom intervened. The second UN-mandated ceasefire halted military action. While the war ended with a military stalemate, it presented Sadat with a political victory that later allowed him to regain the Sinai in return for peace with Israel.

Sadat made a historic visit to Israel in 1977, which led to the 1979 peace treaty in exchange for Israeli withdrawal from Sinai. Sadat's initiative sparked enormous controversy in the Arab world and led to Egypt's expulsion from the Arab League, but it was supported by most Egyptians. On 6 October 1981, Sadat and six diplomats were assassinated while observing a military parade commemorating the eighth anniversary of the 1973 Yom Kippur War. He was succeeded by Hosni Mubarak.

Terrorist insurgency

In 1980s, 1990s, and 2000s, terrorist attacks in Egypt became numerous and severe, and began to target Copts and foreign tourists as well as government officials. Some scholars and authors have credited Islamist writer Sayyid Qutb, who was executed in 1967, as the inspiration for the new wave of attacks.

The 1990s saw an Islamist group, al-Gama'a al-Islamiyya, engage in an extended campaign of violence, from the murders and attempted murders of prominent writers and intellectuals, to the repeated targeting of tourists and foreigners. Serious damage was done to the largest sector of Egypt's economy—tourism—and in turn to the government, but it also devastated the livelihoods of many of the people on whom the group depended for support.

Victims of the campaign against the Egyptian state from 1992 to 1997 exceeded 1,200 and included the head of the counter-terrorism police (Major General Raouf Khayrat), a speaker of parliament (Rifaat el-Mahgoub), dozens of European tourists and Egyptian bystanders, and over 100 Egyptian police. At times, travel by foreigners in parts of Upper Egypt was severely restricted and dangerous. On 17 November 1997, 62 people, mostly tourists, were killed near Luxor. The assailants trapped the people in the Mortuary Temple of Hatshepsut. During this period, Al-Gama'a al-Islamiyya was given support by the governments of Iran and Sudan, as well as al-Qaeda. The Egyptian government received support during that time from the United States. Jubilant celebrations broke out in Tahrir Square at the news. Mubarak may have left Cairo for Sharm el-Sheikh the previous night, before or shortly after the airing of a taped speech in which Mubarak vowed he would not step down or leave.

On 13 February 2011, the high level military command of Egypt announced that both the constitution and the parliament of Egypt had been dissolved. The parliamentary election was to be held in September.

A constitutional referendum was held on 19 March 2011. On 28 November 2011, Egypt held its first parliamentary election since the Mubarak regime fell. Turnout was high and there were no reports of violence, although members of some parties broke the ban on campaigning at polling places by handing out pamphlets and banners. There were, however, complaints of irregularities.

Morsi's presidency

thumb|170px|[[Mohamed Morsi]]

The first round of a presidential election was held in Egypt on 23 and 24 May 2012. Mohamed Morsi won 25% of the vote and Ahmed Shafik, the last prime minister under deposed leader Hosni Mubarak, 24%. A second round was held on 16 and 17 June. On 24 June 2012, the election commission announced that Mohamed Morsi had won the election, making him the first democratically elected president of Egypt. According to official results, Morsi took 51.7 percent of the vote while Shafik received 48.3 percent. On 30 June 2012, Mohamed Morsi was sworn in as Egypt's new president.

On 8 July 2012, Egypt's new president Mohamed Morsi announced he was overriding the military edict that dissolved the country's elected parliament and called lawmakers back into session.

On 10 July 2012, the Supreme Constitutional Court of Egypt negated the decision by Morsi to call the nation's parliament back into session. On 2 August 2012, Egypt's Prime Minister Hisham Qandil announced his 35-member cabinet, including 28 newcomers, of whom four came from the influential Muslim Brotherhood while six and the former interim military ruler Mohamed Hussein Tantawi as the Defence Minister came from the previous Government.

On 22 November 2012, Morsi issued a declaration immunizing his decrees from challenge and seeking to protect the work of the constituent assembly drafting the new constitution. The declaration also requires a retrial of those accused in the Mubarak-era killings of protesters, who had been acquitted, and extends the mandate of the constituent assembly by two months. Additionally, the declaration authorizes Morsi to take any measures necessary to protect the revolution. Liberal and secular groups previously walked out of the constitutional constituent assembly because they believed that it would impose strict Islamic practices, while Muslim Brotherhood backers threw their support behind Morsi.

The move was criticized by Mohamed ElBaradei, the leader of Egypt's Constitution Party, who stated "Morsi today usurped all state powers & appointed himself Egypt's new pharaoh" on his Twitter feed. The move led to massive protests and violent action throughout Egypt. On 5 December 2012, Tens of thousands of supporters and opponents of Egypt's president clashed, hurling rocks and Molotov cocktails and brawling in Cairo's streets, in what was described as the largest violent battle between Islamists and their foes since the country's revolution. Six senior advisors and three other officials resigned from the government and the country's leading Islamic institution called on Morsi to stem his powers. Protesters also clamored from coastal cities to desert towns.

Morsi offered a "national dialogue" with opposition leaders but refused to cancel a 15 December vote on a draft constitution written by an Islamist-dominated assembly that has ignited two weeks of political unrest. It was signed into law by a presidential decree issued by Morsi on 26 December 2012. On 3 July 2013, the constitution was suspended by order of the Egyptian army.

On 30 June 2013, on the first anniversary of the election of Morsi, millions of protesters across Egypt took to the streets and demanded the immediate resignation of the president. On 1 July, the Egyptian Armed Forces issued a 48-hour ultimatum that gave the country's political parties until 3 July to meet the demands of the Egyptian people. The presidency rejected the Egyptian Army's 48-hour ultimatum, vowing that the president would pursue his own plans for national reconciliation to resolve the political crisis. On 3 July, General Abdel Fattah el-Sisi, head of the Egyptian Armed Forces, announced that he had removed Morsi from power, suspended the constitution and would be calling new presidential and Shura Council elections and named Supreme Constitutional Court's leader, Adly Mansour as acting president. Mansour was sworn in on 4 July 2013.

After Morsi

During the months after the coup d'état, a new constitution was prepared, which took effect on 18 January 2014. After that, presidential and parliamentary elections have to be held in June 2014. On 24 March 2014, 529 Morsi's supporters were sentenced to death, while the trial of Morsi himself was still ongoing. Having delivered a final judgement, 492 sentences were commuted to life imprisonment with 37 death sentences being upheld. On 28 April, another mass trial took place with 683 Morsi supporters sentenced to death for killing 1 police officer. In 2015, Egypt participated in the Saudi Arabian-led intervention in Yemen.

El-Sisi Presidency

thumb|170px|[[Abdel Fattah el-Sisi]]

In the elections of June 2014 El-Sisi won with a percentage of 96.1%. On 8 June 2014, Abdel Fatah el-Sisi was officially sworn in as Egypt's new president. Egypt has implemented a rigorous policy of controlling the border to the Gaza Strip, including the dismantling of tunnels between the Gaza strip and Sinai.

In April 2018, El-Sisi was re-elected by landslide in election with no real opposition. In April 2019, Egypt's parliament extended presidential terms from four to six years. President Abdel Fattah al-Sisi was also allowed to run for third term in next election in 2024.

Under El-Sisi Egypt is said to have returned to authoritarianism. New constitutional reforms have been implemented, meaning strengthening the role of military and limiting the political opposition. The constitutional changes were accepted in a referendum in April 2019.

In December 2020, final results of the parliamentary election confirmed a clear majority of the seats for Egypt's Mostaqbal Want (Nation's Future) Party, which strongly supports president El-Sisi. The party even increased its majority, partly because of new electoral rules.

During the 2020–2021 Tigray War, Egypt was also involved. On 19 December 2020, an EEPA report stated, based on testimonials of three Egyptian officials and one European diplomat, that the UAE used its base in Assab (Eritrea) to launch drones strikes against Tigray. The investigative platform Bellingcat confirmed the presence of Chinese-produced drones at the UAE's military base in Assab, Eritrea. Egyptian officials were concerned about strengthening ties between the UAE and Israel. They fear that both countries will collaborate in the construction of an alternative to the Suez Canal, starting from Haifa in Israel. On 19 December 2020, Egypt was reportedly encouraging Sudan to support the TPLF in Tigray. It wants to strengthen a joint position in relation to negotiations on the GERD Dam, which impacts both countries downstream.