Famous in particular for its massive dome, it is considered the epitome of Byzantine architecture. It was the largest cathedral in the world for nearly a thousand years, until the completion of the Seville Cathedral in 1520. The current building was originally constructed as a church between A.D. 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 focal point of the Eastern Orthodox Church 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 Republic of Turkey.
For almost 500 years the principal mosque of Istanbul, Hagia Sophia served as a model for many of the Ottoman mosques such as the Sultan Ahmed Mosque (Blue Mosque of Istanbul), the Şehzade Mosque, the Süleymaniye Mosque, and the Rüstem Pasha Mosque.