Muslim rulers remained in control of Egypt for the next six centuries, with Cairo as the seat of the Fatimid Caliphate. With the end of the Ayyubid dynasty, the Mamluks, a Turco-Circassian military caste, took control about 1250. By the late 13th century, Egypt linked the Red Sea, India, Malaya, and East Indies. The mid-14th-century Black Death killed about 40% of the country's population.