structural:summarization, information:extraction, structural:reformatting, structural:scholar_edition
Early modern period: Ottoman Egypt (1517–1867)

Egypt was conquered by the Ottoman Turks in 1517, after which it became a province of the Ottoman Empire. The defensive militarisation damaged its civil society and economic institutions. The weakening of the economic system combined with the effects of plague left Egypt vulnerable to foreign invasion. Portuguese traders took over their trade. Between 1687 and 1731, Egypt experienced six famines. The 1784 famine cost it roughly one-sixth of its population. Egypt was always a difficult province for the Ottoman Sultans to control, due in part to the continuing power and influence of the Mamluks, the Egyptian military caste who had ruled the country for centuries. Egypt remained semi-autonomous under the Mamluks until it was invaded by the French forces of Napoleon Bonaparte in 1798. After the French were defeated by the British, a three-way power struggle ensued between the Ottoman Turks, Egyptian Mamluks who had ruled Egypt for centuries, and Albanian mercenaries in the service of the Ottomans.

After the French were expelled, power was seized in 1805 by Muhammad Ali Pasha, an Albanian military commander of the Ottoman army in Egypt. Muhammad Ali massacred the Mamluks and established a dynasty that was to rule Egypt until the revolution of 1952. The introduction in 1820 of long-staple cotton transformed its agriculture into a cash-crop monoculture before the end of the century, concentrating land ownership and shifting production towards international markets. Muhammad Ali 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. His military ambition required him to modernise the country: he built industries, a system of canals for irrigation and transport, and reformed the civil service. He constructed a military state with around four percent of the populace serving the army to raise Egypt to a powerful positioning in the Ottoman Empire in a way showing various similarities to the Soviet strategies (without communism) conducted in the 20th century.

Muhammad Ali Pasha evolved the military from one that convened under the tradition of the corvée to a great modernised army. He introduced conscription of the male peasantry in 19th century Egypt, and took a novel approach to create his great army, strengthening it with numbers and in skill. Education and training of the new soldiers became mandatory; the new concepts were furthermore enforced by isolation. The men were held in barracks to avoid distraction of their growth as a military unit to be reckoned with. The resentment for the military way of life eventually faded from the men and a new ideology took hold, one of nationalism and pride. It was with the help of this newly reborn martial unit that Muhammad Ali imposed his rule over Egypt. The policy that Mohammad Ali Pasha followed during his reign explains partly why the numeracy in Egypt compared to other North-African and Middle-Eastern countries increased only at a remarkably small rate, as investment in further education only took place in the military and industrial sector. 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) who encouraged science and agriculture and banned slavery in Egypt.

Egypt under the Muhammad Ali dynasty remained nominally an Ottoman province. It was granted the status of an autonomous vassal state or Khedivate (1867–1914) in 1867. The Suez Canal, built in partnership with the French, was completed in 1869. Its construction was financed by European banks. Large sums also went to patronage and corruption. New taxes caused popular discontent. In 1875 Isma'il avoided bankruptcy by selling all Egypt's shares in the canal to the British government. 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." Other circumstances like epidemic diseases (cattle disease in the 1880s), floods and wars drove the economic downturn and increased Egypt's dependency on foreign debt even further.

Local dissatisfaction with the Khedive and with European intrusion led to the formation of the first nationalist groupings in 1879, with Ahmed ʻUrabi a prominent figure. After increasing tensions and nationalist revolts, the United Kingdom invaded Egypt in 1882, crushing the Egyptian army at the Battle of Tell El Kebir and militarily occupying the country. Following this, the Khedivate became a de facto British protectorate under nominal Ottoman sovereignty. In 1899 the Anglo-Egyptian Condominium Agreement was signed: the Agreement stated that Sudan would be jointly governed by the Khedivate of Egypt and the United Kingdom. However, actual control of Sudan was in British hands only. In 1906, the Denshawai incident prompted many neutral Egyptians to join the nationalist movement.