The series of Islamic Caliphates that ruled Egypt from the 7th century AD came to an end in 1250 AD when the Mamluks seized power, establishing a Sultanate in Egypt that lasted until they fell under Ottoman control in 1518. Even after Egypt became part of the Ottoman Empire, the Mamluks remained in power to govern Egypt until the 19th century when Muhammed Ali rose up to establish a hereditary dynasty. During their centuries in power, the Mamluk Sultans oversaw the greatest heights of Egypt’s power in the Middle Ages.
The Mamluks formed the backbone of the Egyptian military during the Ayyubid Caliphate. They were soldiers recruited from areas in the Balkans and the Caucasus and indoctrinated as slave soldiers. Their training was meant to emphasize strong allegiance to their Sultan and the Mamluk system, which gave them a special status as lords above that of civilian Egyptians. The Bahri Mamluks were able to seize power when the Ayyubid Sultan As-Salah Ayyub died just as a crusader army led by King Louis IX of France landed in the Nile Delta in 1249. In the confusion around the succession of a new sultan, the Bahris were able to defeat the crusader army before the new Caliph and his other troops made it to the front. The new sultan was afraid of the influence of the Bahri Mamluks and attempted to leave them out of his government; however, they responded by revolting several weeks later and claiming control for themselves.
The Bahri Mamluks established themselves in Cairo and oversaw one of the greatest periods of prosperity that Egypt experienced after ancient times. Grand Mamluk mausoleums like the Qala’un Complex on Mu’izz Ad-Din Street in Islamic Cairo are still among the most impressive structures in Cairo. However, the Bahris continued to use mamluks as an important part of their military and were themselves were overthrown by the Burji in 1382. This type of competition between different groups of mamluks became a weakness of the Mamluk Sultanate with shifting loyalties often affecting the stability of the country.
In 1517 Sultan Selim I of the Ottoman Empire took advantage of the increasingly weak grip on power that the Mamluks held over Egypt. Exploiting an advantage in technology and organization, the Ottoman army defeated the Mamluks and extended the authority of the Ottoman Empire over Egypt. Despite their defeat, the Mamluks were retained by the Ottoman Sultan as a ruling class in Egypt. They retained their privileged position in Egyptian society; however, the Mamluks were unsatisfied in their new position as vassals of the Grand Porte in Constantinople. They attempted several times unsuccessfully to re-establish independence from Ottoman rule in the time between 1517 and the French invasion of Egypt in 1798.