The current building was originally constructed as a church between 532 and 537 on the orders of the Byzantine Emperor Justinian, and was in fact the third Church of the Holy Wisdom to occupy the site (the previous two had both been destroyed by riots). It was designed by two architects, Isidore of Miletus and Anthemius of Tralles. The Church contained a large collection of holy relics and featured, among other things, a 50-foot (15 m) silver iconostasis. It was the patriarchal church of the Patriarch of Constantinople and the religious focus point of the Orthodox Byzantine Empire for nearly 1000 years.
In 1453, Constantinople was conquered by the Ottoman Turks and Sultan Mehmed II ordered the building to be converted into a mosque. The bells, altar, iconostasis, and sacrificial vessels were removed, and many of the mosaics were eventually plastered over. The Islamic features - such as the mihrab, the minbar, and the four minarets outside - were added over the course of its history under the Ottomans. It remained as a mosque until 1935, when it was converted into a museum by the secular Republic of Turkey.
Hagia Sophia is one of the greatest surviving examples of Byzantine architecture. Of great artistic value was its decorated interior with mosaics and marble pillars and coverings. The temple itself was so richly and artistically decorated that Justinian proclaimed "Solomon, I have surpassed thee!" (Νενίκηκά σε Σολομών).



