Kairouan (about 800 AD)
Greek architects designed the first buildings in the new Islamic Empire; they had already been living in the area when the Arabs conquered it. Because Greek architects designed them, these buildings look a lot like earlier buildings in West Asia - Late Roman Empire buildings. But because they were now building Islamic mosques and not Christian churches, these Greek architects were able to experiment with some new forms, developing a new Islamic style. One of the earliest mosques is the Dome of the Rock in Jerusalem, from the 600s AD. It's octagonal, like Hadrian's Pantheon, instead of being cross-shaped like a Christian church. In the late 700s AD, the new Arab rulers of North Africa and Spain marked their new territory by building great mosques like the one at Kairouan (modern Tunisia) and the one at Cordoba in Spain.
In the 800s AD, the Abbasid caliphs rejected the Roman identity and moved the capital of the Islamic empire moved further east, to Baghdad, and so the caliphs needed a lot of new beautiful palaces and mosques and university buildings built in Baghdad. Because Baghdad was in the old Sassanian Empire, the architects who lived there followed Sassanian architectural traditions, and these buildings, like the mosque at Samarra, looked very different from the ones built by the Greek architects.
In the end, though, the Islamic Empire made it so easy to travel around that all the architects got to know each other's styles, and there got to be one main style of building all across the Islamic Empire, which was a mixture of the Roman and Sassanian styles. As the empire broke down into a lot of smaller kingdoms, the ruler of each kingdom needed to show how important he was, so he built mosques and palaces in his own capital. The Fatimids, for example, built the Al-Azhar mosque in Cairo in the 900s AD. In Spain in the late 1200s AD, the Almohads, built their own palace at Granada, the Alhambra. Even in northern India, people built mosques in an Islamic style, and even in West Africa, on the other side of the Sahara Desert.
Learn by doing: visit a mosque
More about Umayyad architecture
Medieval European architecture
More about the Islamic Empire