---
title: "Hagia Sophia History: Cathedral, Mosque, Museum and Mosque Again"
date: 2026-11-18
canonical: https://tickets-hagiasophia.com/hagia-sophia-opening-hours/hagia-sophia-history-mosque-or-museum/
---
**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](/images/blog/istanbul-hagia-sophia-history-mosque-or-museum-2.webp)

## 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](https://en.wikipedia.org/wiki/Hagia_Sophia) 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](https://en.wikipedia.org/wiki/Hagia_Sophia) 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.

## 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](https://en.wikipedia.org/wiki/Hagia_Sophia), 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.

## 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](https://en.wikipedia.org/wiki/Hagia_Sophia) 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.

## 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](https://en.wikipedia.org/wiki/Hagia_Sophia) of the original 1934 decree, and [Arab News reported](https://arabnews.com/node/1707086) 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.

## 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](https://arabnews.com/node/1707086) 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.

## 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](https://en.wikipedia.org/wiki/Hagia_Sophia) as the building's current legal status, and [Euronews ties the January 2024 foreign-visitor fee](https://www.euronews.com/travel/2024/01/18/istanbuls-hagia-sophia-mosque-has-introduced-an-entry-fee-here-are-some-free-alternatives) directly to its mosque status, introduced to help fund ongoing conservation. See our [guide on whether Hagia Sophia is free](/hagia-sophia-opening-hours/is-hagia-sophia-free/) for exactly where that fee applies.

| Era | Years | Status | What changed about access |
|---|---|---|---|
| Byzantine cathedral | 537 to 1453 | Christian place of worship | Built and opened under Justinian I |
| Ottoman mosque | 1453 to 1934 | Imperial mosque | Converted after the conquest of Constantinople |
| Secular museum | 1935 to 2020 | Public museum | Mosaics uncovered, open to all as a museum |
| Mosque again | 2020 to present | Active mosque | Open to tourists outside prayer times, fee added 2024 |

## 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](/hagia-sophia-opening-hours/hagia-sophia-dress-code/) and [opening hours guide](/hagia-sophia-opening-hours/) cover exactly what that means for your visit.
