The Mamluk Sultanate ruled Egypt and Syria from 1250 to 1517, a state unlike any other in Islamic history: its rulers were slave soldiers. Mamluks - mostly Turks from the steppe, and later Circassians from the Caucasus - were imported young, converted, and trained into an elite military caste, then freed to serve as commanders and governors; from their ranks came the sultans themselves, who seized power and passed it among themselves rather than to their sons. Under their rule Egypt became the unrivaled political, economic, and cultural center of the eastern Arabic-speaking world, and Cairo its greatest city.
Their fame rests first on war. In 1260 the Mamluk general Qutuz led Egypt's army into Palestine and smashed the Mongol force at Ain Jalut - the first great Mongol defeat that went unavenged, and the battle that saved Egypt and the Islamic heartlands from the fate of Baghdad. Soon after, Baybars murdered Qutuz, took the throne, and proved the greatest of the sultans: he beat the Mongols again, ground down the remaining Crusader strongholds of the coast one by one, and by the time his successors took Acre in 1291 the Crusaders had been expelled from the mainland for good.
The sultans made Cairo magnificent. In 1261 Baybars re-established the Abbasid caliphate there, sheltering a claimant from the ruins of Mongol-sacked Baghdad, so that the caliph now legitimized the sultan. The dynasty's two great houses - the Bahri Turks ruling from the river citadel, then the Burji Circassians from the Cairo Citadel after 1382 - lavished the city with mosques, madrasas, hospitals, and markets; merchants grown rich on the Red Sea spice trade filled its bazaars; scholars made it the intellectual capital of Islam. Under the long third reign of al-Nasir Muhammad, who concluded a lasting peace with the Mongols in 1323, the state reached its height.
The decline gathered in the fifteenth century. Repeated visitations of plague thinned the population; factional strife among the mamluk households consumed the state; and after 1498 the Portuguese, rounding Africa into the Indian Ocean, began to cut into the spice revenues on which everything rested. The rising Ottoman Empire under Selim I defeated the Mamluks at Marj Dabiq in 1516 and took Cairo in 1517, hanging the last sultan at the city gate. Egypt became an Ottoman province - yet the Mamluk caste itself endured, running Egyptian affairs under Ottoman governors for nearly three centuries more.