The Mamluk Reign ended with the Ottoman conquest of Egypt under Sultan Selim I who defeated the Mamluk forces at ar-Raydaniyah. From that time, Egypt became a province under the Ottoman Empire. Selim I left behind him Khair Bey as the sultan's vassal to rule Egypt. Khair Bey kept his court in the Citadel, the ancient residence of the rulers of Egypt.
