The mosque, dating back to the year 500 Hijri in the Islamic calendar (1107 AD), was built at the order of a Shirazi ruler.
The origins of the Shirazi people, inhabiting the Swahili coasts of Eastern Africa, are linked to Shiraz and the southwestern coastal region of Iran.
Between the 13th century and 15th century, the Shirazis founded Persian city-states on the eastern coast of Africa as well as on its islands.
Morteza Rezvanfar, a faculty member of Iran’s Cultural Heritage and Tourism Research Center, who is in Tanzania to study Iranian origins of the region’s cultural heritage, said the mosque has been built with stones and has moldings similar to those seen in Seljuk era mosques in Iran.
"There is an epigraph in the Mihrab of the mosque in which the date of construction of the mosque, 500 Hijri, is written in Kufic script and the date of its renovation (1184 Hijri) in Naskh," he said. He added that the mosque is currently used by local worshippers and that there is an old cemetery near the mosque that is of archeological significance.