The Mamluk Sultanate was a medieval realm spanning Egypt, the Levant and Hejaz that established itself as a caliphate. It lasted from the overthrow of the Ayyubid dynasty until the Ottoman conquest of Egypt in 1517. Historians have traditionally broken the era of Mamluk rule into two periods, one covering 1250–1382 (the "Baḥrī" period) and the other 1382–1517 (the "Burjī" period), named after the ruling dynasties of the respective eras. Modern sources also refer to the same divisions as the "Turkish" and "Circassian" periods to stress the change in the ethnic origins of most Mamluks. Source