Muhammad Ali (4 March 1769 – 2 August 1849) was the Ottoman Albanian viceroy and governor who became the de facto ruler of Egypt from 1805 to 1848, widely considered the founder of modern Egypt. At the height of his rule in 1840, he controlled Egypt, Sudan, Hejaz, the Levant, Crete and parts of Greece and transformed Cairo from a mere Ottoman provincial capital to the center of an expansive empire.
Born in a village in Albania, when he was young he moved with his family to Kavala in the Rumelia Eyalet, where his father, an Albanian tobacco and shipping merchant, served as an Ottoman commander of a small unit in the city. Ali was a military commander in an Albanian Ottoman force sent to recover Egypt from French occupation following Napoleon's withdrawal. He rose to power through a series of political maneuvers, and in 1805 he was named Wāli (governor) of Egypt and gained the rank of Pasha. As Wāli, Ali attempted to modernize Egypt by instituting dramatic reforms in the military, economic and cultural spheres. He also initiated a violent purge of the Mamluks, consolidating his rule and permanently ending the Mamluk hold over Egypt.