At Topkapı Palace, at the court of the Ottoman sultans, the harem staff included eunuchs. At the beginning of the seventeenth century, the corps of harem eunuchs numbered between 800 and 1,200. This was the most amount of eunuchs that here had ever been in the harem, and it would remain the most amount ever employed at the harem. These were Nilotic slaves captured in the Nile vicinity. The sultans were able to obtain these slaves because of their conquest of Egypt in 1517, which gave direct access to slave caravans who used those routes. The conquest of northeastern Sudan in the 1550s continued to expand the empire's reach and access to slave caravans that used trade routes through Sudan. The castrated servicemen in the Muslim and Turkish states in the Middle Ages were recruited to serve in the palace from the times of Sultan Mehmed I onwards. These eunuchs who were trained in the palace and were given the charge of guarding the harem rose in rank after serving in many positions. The harem eunuchs and the harem organization were under the command of the Chief harem eunuch, who was also called the Master of the Girls ("Kızlar Ağası") or Chief Black Eunuch. They supervised the quarters where the female population of the palace lived. They had influence on the palace and later on the state administration in the 17th and 18th centuries as they had access to the sultan and the sultan's family and became very powerful.