The model for building mosques was Muhammad’s house in Medina, constructed in the 7th century. After his death, mosques became important symbols of Islam. During the Middle Ages they were built wherever Arabs settled.
They spread quickly throughout northern Africa and southern Europe, as far as Spain. By the 15th century Islam had spread to Asia, where it became the dominant religion on the Indonesian islands of Java and Sumatra. During the Ottoman Empire Turks converted to Islam and many great mosques were built in Istanbul and other cities. With the Muslim population spreading to the Balkans mosques have become widespread in many cities and towns in Greece, Albania, Serbia and Bosnia.