The Mamluks were a military caste of slave soldiers who rose to power in Egypt, Syria, and parts of the Levant from the mid-13th to early 16th centuries. Originally enslaved Turkic and Circassian warriors, the Mamluks were freed after rigorous military training and formed an elite ruling class. They established the Mamluk Sultanate in 1250 by overthrowing the Ayyubid dynasty and ruled until the Ottoman conquest in 1517. The Mamluks are known for their military prowess, notably defeating the Mongols at the Battle of Ayn Jalut in 1260 and ending the Crusader presence in the region. Their rule was broadly divided into two periods based on ethnic dominance: the Turkic (Bahri) period and the Circassian (Burji) period. The Mamluks played a crucial role in maintaining Muslim control over Egypt and Syria, with Cairo as their capital.