On July 2, 1798, Napoleon, inspired by Alexander the Great's prior conquest of Egypt, invaded Cairo, and within 48 hours, Egypt fell, leaving the land open to Napoleon's goals of establishing trade in raw materials and manufactured French goods in the Middle East. With this, over a century of foreign rule, control, and influence by European powers in the Nile River Valley begins.
While the economically driven goals of French occupation in Egypt were the primary objective, Napoleon continued to stress European cultural and social civility in the region and showed intolerance for his Egyptian subjects. Napoleon himself disliked Islamic clothing, calling it "barbaric". However, this insistence upon Egyptians to become civilized according to French standards also led to positive impacts: for example, the first medical school was established shortly after the establishment of French rule by a young Frenchmen, A. B. Clot Bey and the creation of the Institut d Egypte encouraged the study of Egyptians culture to the Western World - leading to accomplishments such as the interpretation of the Rosetta Stone.
However, this period of French rule was short-lived and in 1799, British Admiral, Lord Nelson, with the hopes of ending the longstanding French threat to Britain's colonies, successfully destroyed Napoleon's fleet at Abukir, off the coast of Alexandria. However, the British, after this battle, only provided a military presence in the region, leaving the formal roles of government to the loosely Ottoman government under the rising leader, Muhammad Ali. Credited with the modernization of Egypt: its military, its transportation system, and its agricultural products, Muhammad Ali clearly threatened the Ottoman Empire's role in Egypt, expanding into Sudan and annexing it as a possession in 1822 and invading Ottoman territories. Consequently, in 1839, the Ottomans and the British successfully allied against Mohammad Ali and left Egypt to Mohammad's descendants.