Hagia Sophia History — 1,500 Years from Basilica to Mosque
The detailed 1,500-year story of Hagia Sophia: Byzantine construction, Ottoman conquest, museum era, and the 2020 reconversion. From a hotel 3 minutes' walk away.

The World's Longest-Used Religious Building
Hagia Sophia's history spans 1,500 years, during which it has changed function four times: basilica → mosque → museum → mosque. No other building in the world has served as the religious and political center of so many different civilizations — and that's no accident. Its architecture, location, and symbolic weight made it what it is.
This guide is for visitors who don't just want to see Hagia Sophia, but to understand it. For practical visit details (tickets, opening hours, prayer times), see our complete Hagia Sophia guide.
Quick Summary
- 537 — Emperor Justinian builds the basilica in just 5 years
- 1453 — The Ottomans take Constantinople, Mehmed II converts it to a mosque
- 1934 — Atatürk designates it a museum
- 2020 — President Erdoğan restores it to a mosque
- The architectural innovation: the 31-meter dome, which was the world's largest interior space for 1,000 years
The Byzantine Era (537–1453) — The Peak of Christianity
Today's Hagia Sophia is the third church on this site. The first two — a 360 basilica and a 415 reconstruction — both fell victim to riots and fires.
Emperor Justinian I began construction in 532, immediately after the Nika Riots, during which the previous Hagia Sophia burned down. Justinian wanted to symbolize his imperial power — and to do so, he needed the largest church ever built.
The architects: Anthemios of Tralles (a mathematician and engineer) and Isidoros of Miletus (an architect and geometer). According to the legend, they weren't architects in the modern sense of the word, but mathematicians who worked out the church's structure primarily through geometric principles.
The construction: completed in just 5 years, 10 months, and 4 days — almost unbelievable for a building of this size. More than 10,000 workers labored on it simultaneously. The construction reused columns from Anatolia, Egypt, Greece, and Italy — many transported from ancient temples (the porphyry columns originally stood in the Temple of the Sun in Baalbek).
Justinian's Words at Consecration
According to legend, when Justinian entered the completed church on December 27, 537, he exclaimed: "Solomon, I have surpassed you!" This was a direct reference to the Temple of Jerusalem, which according to Christianity was the holiest place — and with this declaration Justinian proclaimed that Byzantium had become the new religious center.
The Earthquake and Reconstruction
In 553 and 557, strong earthquakes damaged the dome, and it collapsed in 558. Reconstruction began under Justinian, but Isidoros the Younger (the original architect's nephew) designed a higher, more stable dome, which still stands today. After the 562 reconsecration, the dome remained stable until 989.
The Peak of Christianity
From the 6th century to 1453, Hagia Sophia was the most important church in Eastern Christianity. Byzantine emperors were crowned here. The most important church synods were held here. The dome was the "imprint of heaven" — Byzantines believed the building actually reflected paradise on earth.
Famous visitors: in 988, a delegation from the Grand Prince of Kiev came here — and as a result, Grand Prince Vladimir and with him Russia converted to Byzantine Orthodox Christianity. The delegation reported: "We knew not whether we were in heaven or on earth. There is no such beauty anywhere on earth."
The 1054 Schism
In Hagia Sophia's main hall, on July 16, 1054, one of the most significant moments in Christian history took place: the East-West Schism.
Cardinal Humbert, the Roman Pope's representative, placed a bull of excommunication on the main altar — excommunicating the Patriarch of Constantinople. The Patriarch in turn excommunicated the Pope. This mutual excommunication marked the beginning of the official separation of the Catholic and Orthodox churches — and although these excommunications were mutually rescinded in 1965, the two churches remain divided to this day.
Hagia Sophia itself was the place where Christianity split in two.
The Fourth Crusade (1204) — The Shock
In 1204, participants of the so-called "Fourth Crusade" — originally sent to fight Islam — sacked Constantinople instead. After three days of slaughter and looting, Hagia Sophia was also damaged:
- The candelabras were stolen
- The mosaics were stripped in many places
- The main silver-and-gold altar was carried off
- A prostitute was placed on the patriarch's throne, and mocking songs were sung
This is one of the deepest wounds of Catholic-Orthodox mistrust to this day. Byzantine emperors didn't live in Constantinople for 57 years afterward, and although they retook the city in 1261, Hagia Sophia never regained its former splendor.
The Deësis mosaic (around 1261) is a memory of this return — a symbol of the Palaiologan Renaissance. More in our Hagia Sophia mosaics guide.
1453 — The Fall of Constantinople and the Conversion
On May 29, 1453, after a 53-day siege, Sultan Mehmed II captured Constantinople. The city fell, but Hagia Sophia also changed.
What Mehmed did:
On the day of the conquest, he rode immediately to Hagia Sophia. During the siege, the city's Christian population had taken refuge here — believing an angel protected the church, and no one could enter as an enemy. Mehmed arrived, removed his helmet, bowed, and prayed.
Then he immediately declared it a mosque:
- The cross was removed from the dome and replaced with a crescent
- The figurative mosaics were plastered over (but not destroyed — a crucial decision)
- A minaret was built immediately (the other 3 came later)
- A mihrab was built (prayer niche pointing to Mecca) — slightly off-axis, because the church faces east while Mecca is to the southeast
Hagia Sophia was renamed "Aya Sofya", the phonetic transcription of the Greek name in Ottoman Turkish — meaning the name was preserved, which is unusual for a conqueror's mosque.
Why Didn't Mehmed Destroy It?
There are two answers to this question:
Practical answer: Hagia Sophia was Constantinople's largest and most spectacular building. Demolishing it would have been a waste of resources, and as a mosque it could symbolize the new empire's power.
Symbolic answer: Mehmed called himself "Kaiser-i Rum" ("Caesar of Rome") — meaning he saw himself as the heir of the Byzantine Empire. Preserving the Byzantine emperors' church and merely converting it fit this self-image.
Both explanations contain truth.
The Ottoman Era (1453–1934) — 481 Years as a Mosque
This is the longest period in Hagia Sophia's life. The Ottomans not only preserved the building — they reinforced it:
Mimar Sinan, the greatest Ottoman architect, in the 16th century built buttresses and arched reinforcements around it to prevent the dome from collapsing. This was Sinan's personal tribute to Byzantine architecture — he later designed his own mosques (Süleymaniye, Selimiye) based on Hagia Sophia's model.
The four minarets: built under different sultans — the last in 1574. These four slender towers became Hagia Sophia's iconic exterior — many consider this combination one of the most beautiful in world architecture.
The Ottoman calligraphy: the massive circular medallions under the dome were created in the mid-19th century (1849), by Mustafa İzzet Efendi. They are still visible today, and although they cover many Byzantine elements, they are masterpieces in their own right.
In the late 19th century, Sultan Abdülmecid commissioned a major restoration led by the Swiss-Italian Fossati brothers. They rediscovered some of the Byzantine mosaics under the plaster — but on Abdülmecid's orders, had to plaster over them again. They only made drawings of them.
Atatürk and the Museum Era (1934–2020)
On November 24, 1934, Mustafa Kemal Atatürk, founder of the Turkish Republic, declared Hagia Sophia a museum. This was a radical step:
- Prayer was discontinued
- The mosaics were gradually freed from under the plaster
- Scholars came from all over the world to restore them
- In 1985, UNESCO added it to the World Heritage List as part of Sultanahmet
Atatürk's goal was for Hagia Sophia to be a symbol of modern, secular Turkey — a place open to all religions and cultures. For 86 years, this was the state.
During the museum period, about 3.5 million visitors per year came — making it one of the world's most-visited museums. Entry was free in the early years, later a 100 lira ticket (about 4 EUR).
The 2020 Reconversion
On July 10, 2020, the Turkish Council of State annulled Atatürk's 1934 decree, and President Erdoğan ordered Hagia Sophia's reconversion to a mosque. The first Friday prayer took place on July 24, 2020 — the first in 86 years.
The international response:
- UNESCO: expressed "deep regret," asked for the museum status to be restored
- Greece and the Greek Orthodox Church: called it "a civilizational provocation"
- The Vatican: Pope Francis was "painfully affected"
- The United States and EU: expressed concern
- Turkey: called it a "domestic decision," declarations were "disrespectful"
What changed in practice:
- The ground floor became a prayer space
- Tourists can still visit, but only the upper gallery
- Figurative mosaics are covered with curtains during prayer
- Entry: as of 2024, paid (25 EUR) — only tourists pay, worshippers enter free
Today: 2026
Today's Hagia Sophia fulfills both functions simultaneously — a working mosque and a tourist attraction. This is a complex balance, and the debate isn't over:
- The Greek Orthodox Church continues to demand restoration of museum status
- The Turkish government insists it preserves the Byzantine heritage
- The mosaics remain visible during tourist hours — for now
We who live here see all sides of the change: the wonder on tourists' faces, the silence of worshippers, the concerns of scholars. Hagia Sophia belongs to everyone — and to no one.
How to Experience the History During Your Visit
If you know the history, you see the space differently. A few specific tips:
- Going up to the gallery, imagine the 988 Kievan delegation standing here, looking at this
- Standing before the Deësis Mosaic, remember this is one of the first works of the Palaiologan Renaissance — a symbol of a reborn Byzantium
- Under the calligraphy, see not just the Islamic tradition, but the Ottoman art of the 1850s
- In the middle of the main hall (what you can see of it), think of the 1054 schism
- Looking at the four minarets, remember they reflect a Byzantine-Ottoman hybrid
Most visitors "just look at" Hagia Sophia. You will experience it — different, and deeper.
Hotel Perula's Location
Hagia Sophia is 3 minutes' walk from us. If you're seriously interested in the history, plan an 80-minute or longer visit — and consider returning during your stay.
Our front desk is happy to help with book recommendations or maps if you want to dive deeper into the history. We speak English, Hungarian, and Turkish, and Byzantine-Ottoman history is a personal interest for several of us.
Summary
- 537–1453: Byzantine basilica, the most important church in Christianity
- 1453–1934: Ottoman mosque, with 4 minarets and calligraphy
- 1934–2020: museum, symbol of secular Turkey
- 2020–: mosque again, but open to tourists (paid entry)
- Every era of Hagia Sophia is layered into the building — that's what makes it unique
For practical visit details, see our complete Hagia Sophia guide, and for detailed mosaic analysis, see our Hagia Sophia mosaics guide.
Planning your Istanbul trip?
Book Your StayMore Guides

Hagia Sophia Visit 2026 — Complete Guide for First-Time Visitors
Everything you need to know about Hagia Sophia in 2026: tickets, opening hours, mosque vs museum, mosaics, queue tips, and a 3-minute walk from Hotel Perula.

Hagia Sophia Mosaics — Wonders of the Byzantine Golden Age
The Hagia Sophia mosaics have survived 1,500 years. Detailed guide to the Deësis Mosaic, imperial portraits, and where to find them — 3 minutes' walk from Hotel Perula.

Magnificent Century Filming Locations — A Complete Guide
Where was Muhteşem Yüzyıl actually filmed? Topkapi, Süleymaniye Mosque, Edirne and the rest — what to visit and how to plan your trip from Sultanahmet.