Islam was introduced to the area early on from the Arabian Peninsula, shortly after the hegira. Zeila's two-mihrab Masjid al-Qiblatayn dates to the 7th century, and is the oldest mosque in the city. In the late 9th century, Al-Yaqubi wrote that Muslims were living along the northern Somali seaboard. He also mentioned that the Adal kingdom had its capital in the city, 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 dynasties consisting of Somalized Arabs or Arabized Somalis, who also ruled over the similarly-established Sultanate of Mogadishu in the Benadir region to the south. Adal's history from this founding period forth would be characterized by a succession of battles with neighbouring Abyssinia.