The first church was built by Constantine I, the first emperor of Byzantium who was declared Christianity the official religion of the empire. It has been believed that Hagia Sophia was builted on the ruins of the Temple of Artemis and burned out during the rebellion that occured because of the conflict that occured between Empress Aelia Eudoxia, and St. John the Patriarch of Constantinople Chrysostomos in 404.
Hagia Sofia was builted in 532 again with the request of Justinian I in a bigger, sumptuous and completely different then it was before. Physicist Isidoros of Miletus and mathematician Anthemius of Tralles are appointed as architects that according to a myth Justinian
didn’t like the first draft and Isidoros saw the new and accepted plan in his dream.
Instead of producing the construction materials they used th ones brought from imperial's lands as the Temple of Artemis in Ephesus, the Temple of the Sun (Heliopolis) in Egypt, from the Temple of Baalbek in Lebanon and others…
It was accepted the greatest building of the time that claimed as Emperor Justinian I said the words that: “ Solomon! I defeat you”.
It has 40 windows on the dome and the light coming inside from its stained glass and creates a magnificiant atmosphere that shouldn’t be missed. During the Ottoman period, it was a mosque and during the republic of Turkey it was a museum first and mosque now.