The origins are very obscure. The Bedouin Arabs, who were the original followers of Mohammed and responsible for the first islamic conquests in Syria, Palestine, and Persia, were a nomadic people who lived in tents. In the cities they conquered they began by converting old buildings, and christian churches became mosques; in damascus a pagan temple transformed into a Christian church was incorporated into the Great Mosque (706-15). The earliest and one of the most beautiful of islamic buildings is the Dome of the Rock, Jerusalem, built as a sanctuary (not as a mosque)[there's some debate about this] on a circular plan (685-705, but much altered later, especially in 1561 when the exterior was cased in Persian tiles and the interior lined with marble). The first minarets were converted church towers in Syria, and that built a Kairouan, Tunisia (724-7), is modelled on such a tower. True to their nomadic origins the Umayyad rulers preferred desert residences to town palaces. Several survive in ruins - Qasr al-Hair (728-9); Mshatta near Amman, Jodania; and Qasr at-Tuba in the Wadi Ghadorf near Amman. In plan these groups of buildings were derived from Roman frontier stations. Both religious and secular buildings of the period incorporate elements which were to become distinguishing features of islamic architecture: The horseshoe arch, tunnel vaults of stone and brick, rich surface decoration in carved stone, mosaic, and painting. During the Umayyad period the mosque took its permanent architectural for, dictated by liturgical needs - minarets from which the faithful could be called to prayer; a wide courtyard with a central fountain for ablutions, with surrounding colonnades to give protection from the sun; a large praying chamber, marked externally by a dome (as a sign of importance) and internally by the mihrab or niche indicating the direction of Mecca, towards which the faithful must turn in prayer. The last survivor of the Umayyad dynasty became the founder of the Emirates at Cordoba in Spain, where the early style of Islamic architecture was brought to perfection in the Great Mosque (786-990)
Under the Abassids who surplanted the Umayyads in 750, Persian influence began to dominate the Islamic world. The main achievements in architecture were the foundation of the new capital at Baghdad, built on a circular plan (762-7, now largely destroyed) and, slightly later, the smaller city of Raqqa, Syria of which little survives except its richly decorated gateways. It was at this period that Islamic architecture began to depart radically from Hellenistic and Byzantine conventions. An elaborate court etiquette, derived from persia and contrary to Bedouin ideas of informality, was introduced, and palaces were designed for the new caliphs on more formal and grandiose lines, e.g. the palaces of Ukhaidir and Samarra in Iraq. These large buildings were run up very quickly; stone was abandoned in favour of brick and there was much use of decorative stucco. The main C9 achievements were the great mosque of Kairouan, Tunisia (836); the mosque of Bu Fatata, Susa, Tunisia (850-1); the Great Mosque of Samarra, Iraq with its strange ziggurat-like minaret (c850) and the very well preserved mosque of Inb Tulun, Cairo (876-7). Buidling materials were usually rough but dressed with intricate geometrical or floral surface decorations in painted stucco, mosaic, glazed tiles, or shallow relief carving. Local traditions influenced the decorative styles in various regions (See Indian pakistan, persian and turkish architecture)
''In the original nucleus of the Islamic world the most notable later mosques are those a Tabriz, Persia (1204), Cairo (Mosque of Sultan Barquq 1384) and Isfahan Persia (1585). Most of the earlier religious builings, including the Masjid-el-aksa and the dome of the rock in jerusalem, were also altered and more richly decorated in these centuries. In southern spain a local style of great oppulence was developed; it's principle monuments are the Giralda tower, Seville (1159) and the Alhambra (1309-54)