Hagia Sophia is a former Greek Orthodox Basilica which was turned into an Ottoman mosque and later converted into a museum. It remained the focal point of the Eastern Orthodox Church for nearly thousand years and is one of the most precious monuments of Istanbul.
Three churches have stood on the site where Hagia Sophia stands today. The first church was built during the reign of Constantius II and was opened up in 360 AD. This church was burnt down in a riot in 404 AD and nothing of it remains today.
The second church was built in 415 AD by Theodosius II. It was a basilica built with marble blocks and a wooden roof. The building was destroyed in a fire in 532 AD and its remains can be seen in the western courtyard of Hagia Sophia.
Only a few weeks after the destruction of the second Church, the Byzantine Emperor Justinian I ordered a new basilica to be built, larger and grander than its unfortunate predecessors. Isidore of Miletus and Anthemius of Tralles were chosen as architects for the new church. The material for construction was brought from all corners of the empire and more than 10,000 workers were employed. The new Basilica was inaugurated nearly 6 years later in 537 AD.
Hagia Sophia remained the seat of the Orthodox Patriach of Constantinople and the center for the imperial ceremonies of the Byzantine empire or centuries. It suffered damage in a series of earthquakes but was restored every time. The Crusaders sacked it during the fourth crusade and it became a Roman Catholic Cathedral during the Latin occupation. After the Byzantine recapture of Constantinople in 1261 AD, the church remained in a state of neglect of decades before being restored by Emperor Andronicus II in 1317 AD.
During the Ottoman conquest of Constantinople, the cathedral was promptly pillaged and its occupants massacred or sold into slavery. Sultan Mehmet II then ordered it to be converted into a mosque and Hagia Sophia became the first imperial mosque in Constantinople and continued to be so till the 20th century. Major restoration works were done from time to time and minarets were added on the corners.
After Mustafa Kemal Ataturk became the President of the new republic of Turkey in 1935, he transformed the building into a museum. Since then, the monument has more or less kept its secular structure despite many campaigns to convert it into a mosque/ church again.
The inner galleries of the museum are decorated with splendid Byzantine mosaics. During the visit to the museum, one should spare some time to see the upper gallery, climbing up a path inside the building. The upper galleries give the best perspectives and insights to St Sophia. This is also where one can see the great mosaics and enjoy the serene ambiance of the church.
The second floor is much more attractive. The pictured summary of the history of the Church can be found on this floor.