In theory, slavery in Islamic law does not have a racial or color component, although this has not always been the case in practice.[7] Slaves played various social and economic roles, from domestic worker to highest-ranking positions in the government like Sultan. They created some great empires in history including the Ghaznavid Empire, Khwarazmian Empire, Delhi Sultanate, Mamluk Sultanate of Iraq and Mamluk Sultanate of Egypt and Levant.