The Grand Mufti of Jerusalem has always been a government-appointed position. However, the identity of the appointing government has varied over time.
The first Grand Mufti, Mohammed Tahir al-Husayni, was appointed by the Ottoman Empire, which ruled Palestine in the 1860s. When Husayni died in 1908, his son Kamil al-Husayni succeeded him and served with approval of the British authorities once the British gained control of Jerusalem. However, during World War I, the Ottoman Empire claimed that Husayni was a British stooge and that As'ad Shuqeiri was the rightful Grand Mufti.
When Kamil al-Husayni died, he was succeeded by his brother Mohammad Amin al-Husayni, who was appointed by the British High Commissioner Herbert Samuel. This was done despite the fact that Amin al-Husayni had fought for the Ottoman Empire during the war. In 1948, after Jordan occupied Jerusalem, Abdullah I of Jordan removed al-Husayni from his post, banned him from entering Jerusalem, and appointed Hussam Al-din Jarallah as Grand Mufti. When Jarallah died in 1954, no Grand Mufti was appointed until 1993.