Various Somali Muslim kingdoms were established around this period in the area. In the 14th century, the Zeila-based Adal Sultanate battled the forces of the Ethiopian emperor Amda Seyon I. The Ottoman Empire later occupied Berbera and environs in the 1500s. Muhammad Ali, Pasha of Egypt, subsequently established a foothold in the area between 1821 and 1841.