Egypt was controlled by dynastic rulers, notably the Ikhshidids, Fatimids, and Ayyubids. thousands of Mamluk servants and guards continued to be used and even took high offices. Eventually, a Mamluk rose to become sultan.