The Imperial Harem (Turkish: Harem-i Hümâyûn) of the Ottoman Empire, existing between 1299 and 1923, was the Ottoman sultan's harem composed of the wives, servants (both female slaves and eunuchs), female relatives, and the sultan's concubines, occupying a secluded portion of the Ottoman imperial household. This institution played an important social function within the Ottoman court, and demonstrated considerable political authority in Ottoman affairs, especially during the long period known as the Sultanate of Women. The utmost authority in the Imperial Harem was the Valide Sultan, who ruled over the other women in the household and was often of slave origin herself. The Kizlar Agha (Kızlarağası, also known as the "Chief Black Eunuch" because of the black African origin of most aghas) was the head of the eunuchs responsible for guarding the Imperial Harem.
The word harem is derived from the Arabic harim or haram which give connotations of the sacred and forbidden. The female quarters of Turkish households were then referred to as haremlik due to their prevailing exclusivity.
The harem was the ultimate symbol of the Sultan's power. His ownership of women, mostly slaves, was a sign of wealth, power, and sexual prowess. The institution was introduced in the Turkish society with adoption of Islam, under the influence of the Arab Caliphate, which the Ottomans emulated. To ensure the obedience of the women, many of them were bought and kept into slavery. However, not all members of the Harem were slaves. The main wives, especially those taken into marriage to consolidate personal and dynastic alliances were free women. This was the exception, not the rule. The relationship between slavery and polygamy/harems in the Turkish Harem continued until 1908, at the very least.