Initially, the Ottomans administered the Hejaz under the Eyalet of Egypt.[19] The Emirs were appointed by the Sultan taking into consideration the choice of the sharifs, as well as the opinions of the walis of Egypt, Damascus and Jeddah (after it was established), as well as that of the qadi of Mecca.[19] The emir of Mecca was always from the Hashemite clan of Muhammad.[20] This situation was ended in 1803, when fundamentalist Wahhabis deposed the ruling Emir of Mecca, Sharif Ghalib.[2]