Eunuchs in the Ottoman Imperial harem were slaves imported from foreign lands. Black eunuchs were captured and imported from Sudan, while white eunuchs were usually imported from the Balkans or given as gifts to the Sultan by regional governors. Castrated before they reached puberty, black and white eunuchs had different roles and positions in court.
According to some reports, black eunuchs had their genitalia completely removed. This made them suitable for harem service. Along with the lower ranking odalisques, they served and supervised the female population of the harem. They were under the command of the Chief Black Eunuch who was also called Master of the Girls.
White eunuchs, who were only partially castrated, were assigned to duties outside of the harem as well as in. They could serve as liaison to the outside world and could be employed as teachers in the harem school or secretaries to the Sultan.