The early period of Mameluke rule in Egypt was one of prosperity and growing sea trade with both Asia and Europe. The country soon was weakened by internal struggles for power, however, and in the 15th century it was afflicted with droughts and famines. After the Portuguese in 1497–98 sailed around Africa to the East Indies, Egypt's role in world trade declined.
The Ottoman Turks, who had succeeded the Seljuks and absorbed the Byzantine Empire, in 1517 defeated the Mamelukes and annexed their empire. After acquiring Egypt, the Ottomans showed little interest in it. Mamelukes were permitted to serve as beys (provincial governors); gradually the leading bey became virtually a monarch.
In 1798, during the warfare between France and Great Britain brought on by the French Revolution, Napoleon Bonaparte invaded Egypt, posing a threat to British-held India. The British and Ottoman Turks forced a French withdrawal in 1801.
Mohammed Ali, an officer in the Turkish army, was named pasha (governor) of Egypt in 1805. In 1807, he drove out the British, and in 1811 he had the Mamelukes massacred. Ali reorganized the government and sent a number of young men to Europe for their education. He also created a powerful army, which he used at first in the service of the Ottomans, but later in his own interests In 1831, Ali conquered Syria for himself, but was forced to give it up by European powers friendly to the Ottomans. He was given the right, however, to make the office of pasha hereditary in his family.Expansion of Egypt. This map shows the area that came under the control of Egyptian ruler Mohammad Ali and his successors after 1805. The area included all of what is today Egypt and extended south to include what is today Sudan. In 1882, the United Kingdom invaded and occupied most of what is today Egypt.
A Frenchman, Ferdinand de Lesseps, had a plan for building a canal through the Isthmus of Suez. The British were opposed to it, but the Egyptian pasha, Said, signed an agreement with de Lesseps, and the canal was constructed, 1859–69. By the time of its opening, Ismail Pasha, Said's successor, had been elevated to khedive (viceroy). The British soon discovered the canal's importance and in 1875, bought Ismail's shares in its ownership.