They then entered a meritocracy, first as ladies-in-waiting to the sultan's concubines and children, then to the sultan's mother and finally - if they showed sufficient aptitude and were beautiful enough - to the sultan himself.
BBC: Uncover the secrets of Topkapi Palace