In the late 9th century, Al-Yaqubi wrote that Muslims were living along the northern Somalia seaboard.[6] He also mentioned that the Adal kingdom had its capital in the city,[6][7] suggesting that the Adal Sultanate with Zeila as its headquarters dates back to at least the 9th or 10th centuries. According to I.M. Lewis, the polity was governed by local Somali dynasties, who also ruled over the similarly-established Sultanate of Mogadishu in the Benadir region to the south.