The Eyalet of Egypt was the result of the conquest of Mamluk Egypt by the Ottoman Empire in 1517, following the Ottoman-Mamluk War (1516-1517) and the absorption of Syria into the Empire in 1516. Egypt was administered as an eyalet of the Ottoman Empire (Ottoman Turkish: ایالت مصر Eyālet-i Mıṣr) from 1517 until 1867, with an interruption during the French occupation of 1798 to 1801.
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. As such, Egypt remained semi-autonomous under the Mamluks until it was invaded by the French forces of Napoleon I in 1798. After the French were expelled, power was seized in 1805 by Muhammad Ali Pasha, an Albanian military commander of the Ottoman army 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 in 1867.