The Palace School (Enderun-i Hümayun Mektebi) was a special school inside the Topkapi Palace that provided the education for the princes of the House of Osman and promising young pages, mostly recruited via the Devshirme system, who went on to staff the administrative elite of the Ottoman Empire.
The traditional Ottoman education system consisted of two levels: the Madrasa (Ottoman Turkish: Medrese) for the Muslims, which educated the scholars and the state officials in accordance with Islamic tradition, and the Enderun (Ottoman Turkish: Enderûn), a free boarding school populated by mostly the Christian youths, which annually recruited 3,000 students. These were Christian young males between 8 and 20 years old, who came from one in forty families among the communities settled in Rumelia, a process named Devshirme.
The most promising of the latter were sent to the school located in the grounds of the imperial Topkapi Palace, where they studied law, linguistics, religion, music, art, and fighting, as well as performing functions as palace staff.
- Kemal H Karpat "Social Change and Politics in Turkey: A Structural-Historical Analysis" page 204