of Waq-Waq. Islam was introduced to the northern Somalia coast early on from the Arabian peninsula, shortly after the hijra. 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 already living along this northern littoral. He also mentioned that the Adal kingdom had its capital in the city. Ibn al-Mujawir later wrote that, due to various battles in the Arabian peninsula, Banu Majid people from Yemen settled in the central Mogadishu area. Yaqut and Ibn Said described the city as another important center of Islam, which actively traded with the Swahili-speaking African region to the south of it. The thirteenth century texts also mention mosques and individuals with names such as "al-Shirazi" and "al-Sirafi" and a clan called "Sirafi at Merca", suggestive of an early Persian presence in the area. To the south of the Barbar region, Al-Masudi mentions seaborne trade from Oman and Siraf port near Shiraz to the African Zanj coast, Sofala and Waq-Waq. Ibn Battuta would later visit the Kilwa Sultanate in the 14th century, which was at the time ruled by a Yemeni dynasty led by Sultan Hasan bin Sulayman. Battuta described the majority of inhabitants as being "Zanj" and "jet-black" in color, many of whom had facial tattoos. The term "Zanj" was used to distinguish not between Africans and non-Africans, but between Muslims and non-Muslims. The former were part of the ulama while the latter were designated "Zanj." In Kilwa, then, Islam was still largely limited to the patrician elite. Battuta also described its ruler as often making slave and booty raids on the African idolators as he described the Zanj country. Of the loot, "a fifth was set aside for the family of the Prophet, and all distributed in the manner prescribed by the Koran". Despite these raids against the inland African populations, a symbiotic relationship also appears to have existed between the Africans and the coastal people. Another set of records are found in the Book of the Zanj (Kitab al-Zanuj), a likely compilation of mythical oral traditions and memories of settled traders on the Swahili coast. The late 19th-century document claims that Persians and Arabs were sent by governors of the Persian Gulf region to conquer and colonize the trading coast of East Africa. It also mentions the establishment of the Shirazi dynasty by