The administrative regime of the Protectorate is derived from the concept of protectorate itself, with a formal duality of authorities. On the one hand, there is a Moroccan administration, headed by a khalifa , who exercised, by delegation of the sultan , all his powers, mainly the legislative , which he exercised through the dahir (decree). He was also the highest religious authority. This government led by the Jalifa received the name of Makhzen and was divided into departments, like ministries, coordinated by the Grand Vizier . The ministers were the qadi al-qudat(chief or judge of judges), the Vizier of the Habus (inalienable patrimony whose income is destined to a pious or religious work or institution), the amin al-amlak and the amin al-umana (minister of Finance). It had an advisory council made up of two representatives from each of the five regions. The Jalifa was chosen by the sultan from a pair proposed by the Spanish government. The first Jaliph was Mohammed Mehedi Ould Ben Ismael . Ishmael was the brother of Sultan Hassan I and later Sultan Hassan I was the great-uncle of the second khalifa. The first Jalifa took office in Tetouan on April 27 , 1913. Only two khalifas held office until the independence of Morocco , Muley el Mehdi (between 1913 and 1923) and his son Muley el Hassán bin el Mehdi (who took office at the age of thirteen, ruling between 1925 and 1941 and 1945 and 1956).