Kafur is described by the sources variously as coming from Abyssinia (Ethiopia), the Bilad al-Sudan (Land of the Blacks) or Nubia, the latter being the most probable. Muhammad ibn Tughj, the founder of the Ikhshidid dynasty of Egypt, purchased him as a slave in 923. He is recorded as having a dark complexion and being a eunuch. Recognizing the slave's intelligence and talent, Ibn Tughj freed him. The story goes that Kafur was freed because he kept his eyes fastened upon his master, while others kept their eyes on the master's gifts. Thus, historian Philip Hitti notes, Kafur would be generously rewarded for such loyalty.