and protocol, he was also responsible for military discipline. Under Muhammad I Tapar, the amir hajib is recorded as acting as the intermediary between the Seljuk sultan and his officials, including the vizier. Nizam al-Mulk also mentions the existence of a hajib-i dargah, responsible for ceremonies and order at court; it is unclear whether that was a distinct office from that of amir hajib. From the names of amir hajibs provided by Rawandi, the office was not hereditary—with only one exception: Ali Bar, hajib of Muhammad I, was succeeded by his son Muhammad, under Mahmud II—and was often held by some of the most powerful amir of the day, while others are rather unknown. There were also a number of junior chamberlains with the simple title of hajib in the Seljuk court. In time, the most important generals and provincial governors, as well as other prominent men of the realm, also acquired hajibs in their retinues. These were not always military men. Under the Ilkhanids (1256–1357), the hajib was again a chamberlain, although both in the royal court as well as in the lesser provincial courts these men were drawn from the military class. The hajibs remained court officials under the Timurids, while under the Safavids the chief chamberlain was known as ishik-aqasi bashi and held the duties of a master of ceremonies analogous to the hajib-i dargah. Egypt and the Levant In the Fatimid Caliphate, the hajibs were chamberlains, with the chief chamberlain known as the "Lord of the Gate" (sahib al-bab) or, occasionally, as "Chief Chamberlain" (hajib al-hujjab). Furthermore, the writer Ibn al-Sayrfi mentions the existence of a hajib al-diwan, tasked with preventing unauthorized visitors and preserving state secrets. The military hajib was introduced to the Levant by the Seljuks, and this model was followed by the Zengids and the Ayyubids after them. However, the use of the title hajib for chamberlains continued in Egypt until the 13th century. Maghreb References Sources D. Sourdel, Le vizirat 'Abbaside, Damascus 1959-1960. Arabic words and phrases Medieval Islamic world