The Ottomans began as an Islamic sultanate, and became a dominate force by the middle of the 14th century A.D. and one of the largest empires of its time by the 16th century A.D.
In 1798 A.D., French Napoleon invaded Egypt and defeated the Ottoman's Mamluk army at the Battle of the Pyramids.
England responded quickly to the French endangerment of its communication and trade routes with India, and in the same year defeated a French fleet in Aboukir Bay near Alexandria.
With logistical ties to Europe cut, Napoleon himself returned to the European continent, but with no available fleet the French army in remained in a difficult and non-supported Egyptian occupation. In 1801 A.D., a joint Ottoman and British force arrived in Egypt and defeated the French there.
Ottoman officers battled among themselves for the governorship of Egypt in the absence of any adequate control by the Ottoman central government. Muhammad Ali, an Ottoman officer of Albanian birth who was raised Greek, emerged as the ultimate victor, and in 1805 A.D. was recognized by the central Ottoman government in Istanbul as the Ottoman Empire's governor in Egypt.
Though governor in title, Muhammad Ali exercised the full powers of a monarch in his own right, and established a dynasty that would rule Egypt through the later disintegration of the Ottoman Empire and beyond, until a military coup in the 1950s would establish the modern Arab nation of Egypt.