In the year 527, emperor Justinian of the Byzantine empire, “the sleepless emperor”, erected the Hagia Sophia as an ambitious construction project that now remains as a notable example of Christian architecture. It is said that Justinian embarked on various construction projects that thoroughly remade the city of Constantinople after riots against high taxes destroyed the city. His lavish spending resulted in one of the world’s most important examples of Christian architecture; an enormous dome likened to the heavens, silver, gold, gems, precious stones and numerous lamps decorated the Hagia Sophia. It was such a wondrous and holy structure, that some people claimed that its columns alone healed illness. However, in 720, Emperor Leo III became convinced that veneration of holy images was sinful, so he embarked on the policy of iconoclasm. During this time Hagia Sophia underwent some changes, in which all mosaics and such religious icons were removed until the end of iconoclasm in 843. At that time post-iconoclasm mosaics and paintings were created and the Hagia Sophia was restored to its former glory.
In the early 11th century, a Turkish ruling clan called the Saljuq Turks established themselves in Anatolia, and in 1071 the Turks defeated the Byzantine army at Manzikert, and took hold over the Byzantine Empire. The peasants were grateful for this change in government, as the Byzantine rulers were resented. Considering the fact that the Saljuq Turks were a branch of the Islamic Abassid Empire, naturally they wouldn’t want a famous Christian church tainting their capital at Constantinople. In the 16th Century