Hagia Sophia is a work that was constructed three times in the same location. Today’s Hagia Sophia is known as the “Third Hagia Sophia”. The first construction of Hagia Sophia started during the reign of Constantine I, who accepted Christianity as the official religion of the Roman Empire. This building, which was constructed as a basilica with a wooden roof on the first of the seven hills of Istanbul and was called “The Great Church” at the time, was opened during the reign of Constantine II in 360. There is no remnant from this structure, which was largely devastated as a result of a fire that broke out in the revolt that started in 404.
The second Hagia Sophia was built by Emperor Theodosius II on the first one and opened to worship in 415. This building, which was also constructed as a basilica and with a wooden roof, was devastated by the rebels in the Nika Revolt against Emperor Justinian in 532.
Just after the riots, Emperor Justinian decided to build a larger and more glorious Hagia Sophia than the first two. The third Hagia Sophia was built by the Byzantine Emperor Justinian I in 532-537.
Hagia Sophia, which was used as the Imperial Church of Eastern Rome, was frequently devastated due to riots, wars, and natural disasters throughout history. Hagia Sophia experienced one of the biggest destructions during the 4th Crusade in 1204 when the city was invaded. The Crusaders looted Hagia Sophia along with the whole city. During the Latin occupation that lasted from 1204 to 1261 in Istanbul, Hagia Sophia was converted into a cathedral attached to the Roman Catholic Church.
Repairs were made to try and preserve the Hagia Sophia, which was seriously damaged after the Eastern Roman administration was re-established in Istanbul. However, the repairs were insufficient and in 1346 the eastern archivolt of the Hagia Sophia and a part of the dome collapsed.
In fact, Hagia Sophia experienced the darkest period of its history from the Latin invasion to the conquest of Istanbul. Hagia Sophia, which was destroyed twice and built for the third time, ruined by wars and revolts for centuries, and the parts of which collapsed due to neglect and architectural errors, remained under the permanent threat of collapse until the conquest of Istanbul by Fatih Sultan Mehmed Khan. In addition, the sociological and symbolic meaning of the temple was greatly damaged due to the schism between the Catholic and Orthodox churches.
The Ottomans took great care of the Hagia Sophia Mosque, which they acknowledged and appreciated as the symbol of the conquest, maintained and repaired it continuously, and turned the mosque into a much more robust structure starting from the rule of Fatih Sultan Mehmed Khan. In particular, the additions and arrangements made by Sinan the Architect to Hagia Sophia played a major role in the survival of this heritage of humanity.
Thus, it is stated in the historical records that Fatih Sultan Mehmed Khan, who went to Hagia Sophia right after the conquest, was saddened by the status of the mosque and recited the following verses:
“Perdedâri mîkoned ber kasr-i Kayser ankebut Bûm novbet mîzened der tarem-i Efrâsiyâb”
(“A spider spins its web in the palace of the Kaiser, An owl hoots in the towers of Afrasiab”)
Fatih Sultan Mehmed Khan, who endowed the Hagia Sophia Mosque as his own charity and secured the maintenance-repair costs by providing the income from several properties, started the educational activities by building a madrasah adjacent to the mosque. The first minaret of Hagia Sophia was built of wood during the rule of Fatih Sultan Mehmed Khan. This minaret, which existed for many years, was removed during the major repair in 1574. The second minaret of the Hagia Sophia Mosque was built of bricks during the rule of Sultan Bayezid II.
One of the Ottoman sultans who showed the greatest interest in Hagia Sophia was Sultan Selim II. After the building showed signs of fatigue, Selim II Khan appointed Sinan the Architect for the maintenance and repair of Hagia Sophia. The Hagia Sophia, whose domes and walls collapsed many times during the Eastern Roman period, never collapsed again after the renovations of Sinan the Architect despite many great earthquakes in Istanbul. The tradition of building tombs for the sultans in the graveyard of Hagia Sophia Complex started with the first tomb built by Sinan the Architect for Sultan Selim II.
Hagia Sophia, which was converted into a mosque with the conquest and served as a mosque for 481 years, was closed off to the public after the restoration works started in the 1930s. Then it was turned into a museum with a Cabinet Decree dated November 24, 1934. The Council of State reversed the Cabinet Decree in question on July 10, 2020. The Hagia Sophia Mosque was reopened to worship with the Presidential Decree No. 2729 signed by President Recep Tayyip Erdoğan and promulgated immediately after.