Although nominally part of the Ottoman Empire, Yemen and the sahil (including Zeila) came progressively under the control of Muhammad Ali, ruler of Egypt, between 1821 and 1841.[3] After the Egyptians withdrew from the Yemeni seaboard in 1841, Haj Ali Shermerki, a successful and ambitious Somali merchant, purchased from them executive rights over Zeila. Shermerki's governorship had an instant effect on the city, as he manoeuvred to monopolize as much of the regional trade as possible, with his sights set as far as Harar and the Ogaden.[4] Shermerki was later succeeded as Governor of Zeila by Abu Bakr Pasha, a local Afar statesman.[5]