Monarchs of the Muhammad Ali Dynasty reigned over Egypt from 1805 to 1953. Their rule also extended to Sudan throughout much of this period, as well as to the Levant, and Hejaz during the first half of the 19th century. The Muhammad Ali Dynasty was founded by Muhammad Ali Pasha, an Albanian commander in the expeditionary force sent by the Ottoman Empire in 1801 to dislodge the French occupation of Egypt led by Napoleon Bonaparte. The defeat and departure of the French left a power vacuum in Egypt, which had been an Ottoman province since the 16th century, but in which the pre-Ottoman Mamluk military caste maintained considerable power. After a three-year civil war, Muhammad Ali managed to consolidate his control over Egypt, and declared himself Khedive of the country. The Ottoman Porte refused to acknowledge this title, instead recognizing Muhammad Ali by the more junior title of Wāli (meaning governor or viceroy) on 18 June 1805, making Muhammad Ali the successor to Ahmad Khurshid Pasha in that position. In the years following his consolidation of power, Muhammad Ali extended Egypt's borders south into Sudan, and eastwards into the Arab Mashreq, particularly the Levant. In 1840, his demand for hereditary control of Egypt and Sudan to be passed to his heirs and successors was accepted and confirmed by the Convention of London, but he was compelled to agree that, upon his death, control over his territories in the Mashreq would revert to the Porte.
Muhammad Ali had a 43-year reign, the longest in the history of modern Egypt. Called the "father of modern Egypt," he is viewed as the dynasty's most important ruler, due to his massive agricultural, administrative, and military reforms. His son, Ibrahim Pasha, was the shortest-reigning monarch of the dynasty. The duration of his rule varies from one source to another, depending on whether or not his reign as regent is taken into account. Contrary to what the short length of his reign might suggest, Ibrahim Pasha is far from being a historically negligible figure, although most of his significant achievements were made before his accession to the throne. His successor, Abbas Helmi I, a traditionalist described by Lord Cromer as "an Oriental despot of the worst type," reverted many of his predecessors' reform-minded measures, and is considered the most controversial ruler of his family.
Sa'id Pasha and Isma'il Pasha were far more open to Western influence, and continued the process of expansion and modernization set up by Muhammad Ali, but on a more lavish scale. Isma'il Pasha is especially notable for his inauguration of the Suez Canal and for his Haussmann-inspired rebuilding of Cairo. However, his costly policy of Europeanisation left the country bankrupt; as a consequence, European creditors greatly expanded their influence over Egypt and Sudan's internal affairs. Isma'il's son, Tewfik Pasha, became increasingly powerless following the Urabi Revolt, and was turned into a puppet ruler following the British occupation in 1882. After his death, his son, Abbas Helmi II, tried unsuccessfully to detach himself from the influence of the British, who ended up deposing him in 1914. The following reign, that of Hussein Kamel, lasted only three years and was thus little more than an interregnum. Hussein Kamel's successor Fuad I was a far more historically significant figure. Described by historian Philip Mansel as "the last great royal patron of history," his reign was marked by the Egyptian Revolution of 1919, and the United Kingdom's resultant recognition of Egyptian independence. The British, however, refused to include Sudan within the sphere of this recognition, and continued to apply the terms of the Anglo-Egyptian Condominium. Fuad's son, Farouk I, was Egypt and Sudan's penultimate monarch. After his forced abdication following the Egyptian Revolution of 1952, his infant son Fuad II continued to reign as a nominal king-in-exile until the monarchy was formally abolished on 18 June 1953.
Rulers of the Muhammad Ali Dynasty governed Egypt and Sudan as absolute monarchs until constitutional rule was established in August 1878. Following the dissolution of the Ottoman Empire, the Egyptian and Sudanese monarchy emerged as the most important in the Middle East and the wider Arab world. Largely powerless during the British occupation, Egypt and Sudan's monarchs saw their powers increased following the recognition of independence, and the subsequent adoption of the 1923 Constitution, the most liberal in the country's history. Although King Fuad I often ruled as an autocrat, partly because he repeatedly overrode some provisions of the Constitution, Egypt and Sudan had the freest parliament in the region. During Fuad's reign and that of his son, Farouk, the country witnessed six free parliamentary elections and enjoyed a free press as well as an independent judiciary. According to Philip Mansel, "the Egyptian monarchy appeared so splendid, powerful and popular that King Farouk's ignominious end seems inexplicable." The Muhammad Ali Dynasty's downfall is often regarded as having begun with the Abdeen Palace Incident of 1942, which greatly discredited the King. It accelerated with the growing discontent of Egypt's armed forces following the country's defeat in the 1948 Arab–Israeli War. Disgruntled members of the military formed the Free Officers Movement, which led a coup d'état on 23 July 1952, thereby marking the beginning of the Egyptian Revolution of 1952. The toppling of the monarchy, and the resultant establishment of a revolutionary republican government, was the first of its kind in the modern Arab world, and was a crucial event in the region's history; it accelerated dramatically the rise of Pan-Arabism, and had a domino effect leading to similar military overthrows of the monarchies of Iraq (1958), North Yemen (1962), and Libya (1969). Egypt has had a republican form of government since the end of monarchical rule. Although the establishment of genuine democratic rule was one of the six core principles of the Revolution, political parties were banned in 1953 and the country was turned into a military dictatorship. The thriving pluralism that characterized political life during the latter period of the Muhammad Ali Dynasty's rule was thus brought to an end. Even though a multi-party system was officially restored in Egypt in 1976, the country has never recovered the level of political freedom it had enjoyed during the monarchy. In common with most deposed royal families, the Muhammad Ali Dynasty was initially vilified by the new revolutionary regime. Nonetheless, it has undergone re-evaluation in recent years; nostalgia for the former monarchy has been growing among some in Egypt, largely fuelled by the airing in 2007 of a hugely successful serial about the life of King Farouk I.
From 1805 to 1867, Egypt remained legally a nominal Ottoman province governed by a Wāli on behalf of the Ottoman Sultan, although it was de facto virtually independent, with its wālis styling themselves as Khedives. Despite their legally subservient status, Egypt's wālis enjoyed far more political power than their descendants, who were to rule the country as nominally independent sultans and kings decades later. Throughout the 19th century, the legal fiction of Ottoman suzerainty was nonetheless symbolically maintained through Egypt's payment of an annual tribute. Moreover, although the Muhammad Ali Dynasty became a hereditary monarchy in 1840, each new ruler had to receive a firman (Arabic word for decree) from the Ottoman Sultan appointing him as Wāli in order to be formally invested with his office. Until 1866, Egypt's laws of succession followed the principle of agnatic seniority, which means that the reigning wāli always had to be the eldest male member of the dynasty. Rulers thus inherited the throne based on their age, not on their degree of proximity. This explains why none of Ibrahim Pasha's successors was directly succeeded by his own son.
On 8 June 1867, Ottoman Sultan Abdülaziz formally recognized Isma'il Pasha by the title Khedive, which ranked higher than that of Vizier but lower than that of Caliph. The Khedivate of Egypt was still nominally a subject of the Ottoman Sultan, and its rulers were still technically appointed and dismissed by an imperial firman. Nevertheless, the Khedive actually exercised most sovereign powers, including the appointment of his council of ministers, the rector of Al-Azhar, and high-ranking military and naval officers. He could also sign treaties with foreign powers and borrow money for the state treasury. On 17 May 1866, the rule of succession in Egypt was changed from one based on agnatic seniority to one based on male primogeniture in the direct line of Isma'il Pasha. After the British occupied the country in 1882, the Khedive's exercise of power was limited greatly by the advice of the British agent and consul general, who became the de facto ruler of the country.
On 19 December 1914, Abbas Helmi II was deposed by the United Kingdom while he was on a visit to Vienna due to his anti-British stance. The British severed Egypt's nominal ties to the Ottoman Empire, thus ending the country's status as a khedivate. Prime Minister Hussein Rushdi Pasha served as acting head of state until Abbas Helmi II's half-uncle Hussein Kamel was chosen as the country's new monarch. For a brief while, the British had considered putting an end to the Muhammad Ali Dynasty and installing Aga Khan III as ruler. Hussein Kamel took the title of Sultan of Egypt (preceded by the untranslatable style of Sa Hautesse), thereby putting him on an equal footing with the Ottoman Sultan. However, the end of nominal Ottoman suzerainty over Egypt did not result in genuine independence; the Sultanate of Egypt was a British protectorate where real power lay in the hand of the High Commissioner.
On 28 February 1922, the United Kingdom issued a declaration through which it unilaterally ended its protectorate over Egypt. As a result, Sultan Fuad I promulgated a decree on 15 March 1922 whereby he adopted the title of King of Egypt. It has been reported that the title change was due not only to Egypt's newly independent status as the Kingdom of Egypt, but also to Fuad I's desire to be accorded the same title as the newly installed rulers of the newly created kingdoms of Hejaz, Syria and Iraq. Egyptian nationalist leader Saad Zaghlul maintained that the reason for the change of title from Sultan (equivalent to emperor) to the lesser title of King was because the British would not recognize an independent Egyptian ruler whose title was superior to their own monarch.
Egyptian independence was limited severely by the continuing British occupation of the country. British influence remained pervasive, as evidenced by the Abdeen Palace Incident of 1942, which almost led to Farouk I's forced abdication. In October 1951, Prime Minister Mustafa el-Nahhas introduced, and Parliament approved, decrees unilaterally abrogating the Anglo-Egyptian Treaty of 1936 and proclaiming Farouk I King of Egypt and the Sudan. The move was intended to further Egypt's claims over Sudan, which had been governed as an Anglo-Egyptian condominium since 1899.