 In control of both the Harem and a net of spies in the black eunuchs, the Chief Eunuch was involved in almost every palace intrigue and could thereby gain power over either the sultan or one of his viziers, ministers, or other court officials.One of the most powerful Chief Eunuchs was Beshir Agha in the 1730s, who played a crucial role in establishing the Ottoman version of Hanafi Islam throughout the Empire by founding libraries and schools.The entire "Devşirme" system, where the children of Christian families in the Balkans unable to pay the onerous "jizya" tax were taken away, and, depending upon their sex, became either concubines, in the case of the girls, or, in the case of the boys, were conscripted into Janissary Corps or became eunuchs.