The full story of Hagia Sophia in Istanbul — how it began in 537 AD, the dome that changed architecture, the 1453 conquest, its return to prayer in 2020, and…
Few buildings on earth carry as much history in their stones as Hagia Sophia. For almost 1,500 years it has stood on the same hill above the Bosphorus in Istanbul: first as the great church of the Byzantine Empire, then for nearly five centuries as one of the most important mosques in the Muslim world, briefly as a museum, and today once again as a working mosque open to visitors of every faith.
What makes it extraordinary is not only its age. Hagia Sophia is the point where two civilisations meet in a single room — Byzantine gold mosaics look down on Ottoman calligraphy medallions, and the mihrab sits beneath a dome designed nearly a thousand years before it was installed. For Muslim travellers it is also the fulfilment of a long-awaited promise: the conquest of Constantinople foretold by the Prophet ﷺ.
This guide covers the full story — how the building began, how it was engineered, what happened in 1453, how it returned to prayer in 2020, and everything practical you need to visit it respectfully today.
There have been three churches on this site. The first, dedicated in 360 AD under Constantius II, was a timber-roofed basilica that burned down during riots in 404. The second, rebuilt by Theodosius II in 415, was destroyed in the Nika riots of 532, when much of Constantinople was set alight in an uprising against Emperor Justinian I.
Justinian's response was audacious. Rather than restore what had stood before, he commissioned an entirely new kind of building from two men who were mathematicians rather than builders: Anthemius of Tralles and Isidore of Miletus. Work began just weeks after the riots, in February 532. Around 10,000 workers were employed, marble was shipped from quarries across the empire, and columns were reportedly reused from older temples at Ephesus and Baalbek.
The new Hagia Sophia — "Holy Wisdom" — was consecrated on 27 December 537, five years and ten months later. It remained the largest cathedral in the world for close to a thousand years, and no dome of its span would be attempted again in Europe until the Renaissance.
Solomon, I have surpassed thee.
Attributed to Emperor Justinian I on entering the completed building, 537 AD
Hagia Sophia: Through the ages
The central dome is the reason architects still study Hagia Sophia. It spans roughly 31 metres and rises about 55 metres above the floor, yet it appears to hover rather than press down. The trick is a ring of forty arched windows around its base: daylight cuts the dome away from the walls so the masonry above seems weightless. Beneath it, the load is carried outward through pendentives — curved triangular sections that transfer the weight of a circular dome onto a square plan. Hagia Sophia is the first building to use pendentives at this scale, and the idea passed directly into Ottoman mosque design, shaping the Süleymaniye, the Blue Mosque and hundreds of others.
The first dome was too shallow and partially collapsed in the earthquake of 558. Its replacement, completed in 562 by Isidore the Younger, was raised higher and ribbed for strength. In the 16th century the Ottoman chief architect Mimar Sinan added buttresses and structural repairs that are a large part of why the building is still standing after dozens of major earthquakes.
On 29 May 1453, after a siege of fifty-three days, Constantinople fell to the Ottoman army led by Sultan Mehmed II — Sultan Muhammad al-Fatih — who was twenty-one years old. Muslims had anticipated this moment for eight centuries, on the strength of a narration recorded by Imam Ahmad in which the Prophet ﷺ said Constantinople would be conquered, praising the commander who would take it and the army that would follow him.
Mehmed rode to Hagia Sophia the same day. The building was converted into a mosque, and the first Friday prayer was held within the week. Rather than demolish what stood, the Ottomans adapted it: a mihrab was set into the apse, a minbar installed, and four minarets added over the following century by successive sultans. Figural mosaics were plastered over rather than destroyed — the reason so many survived to be uncovered later.
For nearly 500 years, Ayasofya was a working congregational mosque and the template for Ottoman imperial architecture. Mimar Sinan restored and reinforced it in the 1570s, adding the buttresses and the mausolea that still stand in the courtyard, where several sultans are buried.
In 1934, under the secular republic founded by Mustafa Kemal Atatürk, a cabinet decree closed Hagia Sophia as a mosque and reopened it in 1935 as a museum. Prayer rugs were lifted, plaster was removed from Byzantine mosaics, and for the next eighty-five years it was Turkiye's most visited monument, drawing well over three million people a year.
On 10 July 2020, Turkiye's Council of State annulled the 1934 decree and the building was formally returned to use as a mosque. The first congregational prayer in eighty-six years was held on 24 July 2020, and the site was renamed Ayasofya-i Kebir Cami-i Şerifi — the Hagia Sophia Grand Mosque.
It remains open to visitors of all faiths outside prayer times, and the mosaics remain in place; curtains and controlled lighting screen figural images during prayer. Since 2024 a separate ticketed route through the upper gallery has been in place for non-worshipping visitors, while the ground-floor prayer hall stays free to enter for those coming to pray.