Hagia Sophia’s history spans four distinct eras under one roof: a Byzantine cathedral from 537 AD, an Ottoman mosque from 1453, a secular museum from 1935, and a mosque again since 2020. Knowing why each change happened explains both the mixed Christian and Islamic decor inside and the visiting rules on your Hagia Sophia ticket today.

Infographic-style timeline graphic showing four eras of Hagia Sophia labeled cathedral, mosque, museum, mosque again, generic building-icon style, no dates shown as text

Interior of Hagia Sophia showing a Byzantine mosaic beside Ottoman calligraphic medallions under the dome, soft natural light, no people in focus Ready to see prices? Hagia Sophia Skip-the-Line Ticket, from $37.93 See times

What Is the History of Hagia Sophia?

The building has passed through four eras: a Byzantine cathedral, an Ottoman mosque, a secular museum, and a mosque again since 2020, each one changing both its function and what visitors could see inside.

Wikipedia’s entry lays out the full sequence, from Justinian’s sixth-century cathedral through the 1453 Ottoman conversion, the 1935 museum opening, and the 2020 reclassification as a mosque. Each transition left a physical mark on the building that the next era had to work around rather than erase.

When Was Hagia Sophia Built?

Byzantine emperor Justinian I had the current building constructed between 532 and 537, and it was inaugurated as a Christian cathedral on 27 December 537.

Wikipedia credits architects Isidore of Miletus and Anthemius of Tralles with the design, with construction beginning on 23 February 532 after an earlier church on the site burned down. That makes the current structure nearly 1,500 years old, the single fact that underlies almost everything else on this page.

Want a closer look? Hagia Sophia Skip-the-Line Ticket, from $37.93 See times

Why Did Hagia Sophia Become a Mosque?

When Sultan Mehmed II conquered Constantinople in 1453, he converted the cathedral into an imperial mosque, a status it held for nearly five centuries under Ottoman rule.

Wikipedia confirms the conversion followed directly from the 1453 conquest, with Mehmed the Conqueror repurposing the building as a working mosque rather than demolishing or replacing it, which is why so much of the original Byzantine structure still stands today.

Short on time? Hagia Sophia, Basilica Cistern & Blue Mosque Tickets with Audio, from $93.49 See times

When Did Hagia Sophia Become a Museum?

A 1934 Turkish cabinet decision ended its mosque status as part of the new Republic’s secularizing reforms, and the building reopened to the public as a museum in 1935, which is why sources give both years.

Wikipedia notes the building was closed to the public from 1931 to 1935 during the transition, with the 1934 cabinet decision ending its mosque status and the 1935 reopening marking the actual museum debut. The gap between those two years is not a factual error between sources, it’s simply the decision date versus the reopening date for the same change.

Ready to see prices? Hagia Sophia & Blue Mosque Tour with Ticket, Optional Cistern, from $16.50 See times

Why Did Hagia Sophia Become a Mosque Again in 2020?

Turkey’s Council of State ruled the 1934 museum decision unlawful and annulled it, and President Erdogan reopened the building to Muslim worship in July 2020 while keeping it open to tourists outside prayer times.

Wikipedia confirms the Council of State’s 2020 annulment of the original 1934 decree, and Arab News reported that Erdogan declared the building open to Muslim worship that same July, following the court ruling that its museum conversion had been unlawful. Authorities said at the time that the building would stay open to all visitors and tourists outside prayer times, with mosaics uncovered.

Want a closer look? Hagia Sophia Skip-the-Line Ticket, from $37.93 See times

Why Does Hagia Sophia Have Both Mosaics and Islamic Calligraphy Inside?

Ottoman-era mosaics of Christian figures were plastered over centuries ago and uncovered again during the museum period; since the 2020 mosque conversion, only the mosaics facing the direction of prayer are curtained during services, so the Byzantine and Ottoman layers now sit side by side.

Arab News reports that mosaics of Mary and Gabriel facing the Qiblah are covered with curtains during prayers, while mosaics of Jesus and other figures not in that direction stay uncovered throughout. Picture a first-time visitor standing under the dome at midday, watching a staff member draw a curtain over a mosaic of the Virgin Mary just before the call to prayer. It’s a concrete way to see that the building’s dual identity isn’t historical trivia, it plays out in front of visitors every single day.

Short on time? Hagia Sophia, Basilica Cistern & Blue Mosque Tickets with Audio, from $93.49 See times

Is Hagia Sophia a Church, a Mosque or a Museum Today?

It is legally and functionally an active mosque today, not a museum, though it remains open to tourists outside the five daily prayers, which is why paid visiting tickets still exist alongside free worship access.

Wikipedia confirms the 2020 reclassification stands as the building’s current legal status, and Euronews ties the January 2024 foreign-visitor fee directly to its mosque status, introduced to help fund ongoing conservation. See our guide on whether Hagia Sophia is free for exactly where that fee applies.

EraYearsStatusWhat changed about access
Byzantine cathedral537 to 1453Christian place of worshipBuilt and opened under Justinian I
Ottoman mosque1453 to 1934Imperial mosqueConverted after the conquest of Constantinople
Secular museum1935 to 2020Public museumMosaics uncovered, open to all as a museum
Mosque again2020 to presentActive mosqueOpen to tourists outside prayer times, fee added 2024
Ready to see prices? Hagia Sophia & Blue Mosque Tour with Ticket, Optional Cistern, from $16.50 See times

Hagia Sophia History: FAQ

Who built Hagia Sophia?

Byzantine emperor Justinian I ordered its construction, with architects Isidore of Miletus and Anthemius of Tralles designing the building between 532 and 537.

How old is Hagia Sophia?

The current structure dates to 537 AD, making it nearly 1,500 years old, one of the longest-standing large domed buildings still in active use anywhere.

What happened to Hagia Sophia’s bells and crosses when it became a mosque?

Our sources don’t detail the specific fate of these items during the 1453 conversion. The broader pattern across that era was adapting Christian features for mosque use rather than wholesale removal.

Can Hagia Sophia become a museum again in the future?

Our sources don’t speculate on this. Its legal status has already changed twice in less than a century, so no outcome should be treated as permanent.

I’d see the dress code and the Friday prayer closure as the practical legacy of this history rather than arbitrary rules, since both come directly from Hagia Sophia’s current status as a working mosque; our dress code guide and opening hours guide cover exactly what that means for your visit.

Want a closer look? Hagia Sophia Skip-the-Line Ticket, from $37.93 See times