Kafes
The Kafes (), literally "cage", was the part of the Imperial Harem of the Ottoman Palace where possible successors to the throne were kept under a form of house-arrest and constant surveillance by the palace guards. The early history of the Ottoman Empire is littered with succession wars between rival sons of the deceased sultan. It was common for a new sultan to have his brothers killed, including infants, sometimes dozens of them at once. This practice reduced the number of claimants to the throne, leading to several occasions where the Ottoman line seemed destined to end. The confinement  of heirs provided security for an incumbent sultan and continuity of the dynasty. First use. When Ahmet I died in 1617, his eldest son was only 13 years old, and for the first time in 14 generations, the Imperial Council altered succession so that the late sultan's brother acceded to the throne as Mustafa I, aged 25 years. He was deposed (for the first time) the following year and became the first inmate of the Kafes although he and other princes throughout the preceding generations had been sequestered in various other places of comfortable confinement. Rule of seniority. The  next time there was a succession choice between a son or younger brother was in 1687 and the brother was again preferred. Thereafter, agnatic seniority was adopted as the rule of succession in the House of Osman so that all males within an older generation were exhausted before the succession of the eldest male in the next generation. This rule has also been largely adopted by other Islamic kingdoms. It became common to confine brothers, cousins and nephews to the Cage, generally not later than when they left the harem (women's quarters) at puberty. This also marked the end  of their education and many sultans came to the throne ill-prepared to be rulers, without any experience of government or affairs outside the Cage. There they had only the company of servants and the women of their harems, occasionally with deposed sultans. The degree of confinement varied from reign to reign. Abdülaziz (1861–76) confined his nephews to the Cage when he succeeded his half-brother Abdülmecid I, their father, on the throne, but allowed them some freedom. He took his two eldest nephews with him when he traveled to Europe in 1867. At different times, it was the policy  to ensure that inmates of the Cage only took barren concubines. Consequently, some sultans did not produce sons until they acceded to the throne. These sons, by virtue of their youth at the time of their fathers' deaths, ensured that the rule of elderness became entrenched so that it sometimes happened that the son of a sultan was confined during the reigns of cousins and older brothers before acceding to his father's throne. Some inmates of the Cage grew old and died there before having the opportunity to succeed to the throne. Confinement in the Cage had a great  impact on the personalities of the captives in the Kafes and many of them developed psychological disorders. At least one deposed sultan and one heir committed suicide in the Cage. Later years. The last Ottoman sultan, Mehmet VI Vahidettin (1918–22) was aged 56 when he came to the throne and had been either in the harem or the Cage his whole life. He was confined to the Cage by his uncle (Abdülaziz) and had stayed there during the reigns of his three older brothers. It was the longest and last confinement of a sultan by his predecessors. By the later  years of the Ottoman dynasty, the Cage had become a metaphor for the confinement of princes rather than the actual place where they were confined. The heir of the last sultan had apartments in the Dolmabahce Palace, on the Bosphorus, where the sultan also lived. The last sultan's deposed older brother (Abdulhamit II) was confined in rooms of his own choosing at Beylerbeyi Palace in his final years and died there in 1918. The Topkapı Palace, the original location of the Cage, had long fallen into disuse by the imperial family.