Hagia Sophia's Full History: From Byzantine Church to Ottoman Mosque

Orthodox cathedral, Catholic cathedral, Orthodox again, imperial mosque, secular museum, working mosque. Six identities in fifteen centuries, and every one of them left something you can still stand in front of.

The Deesis mosaic inside Hagia Sophia, from its Byzantine era

On 27 December 537, the first service was held in a building that had taken five years to raise and that nobody at the time knew how to explain structurally. Justinian's engineers had put a 31-metre dome over an open square, ringed its base with forty windows, and made it look as though the whole thing floated. The mathematics to justify it did not exist yet. It stood anyway.

Everything that happened afterward, the crusader sack, the conquest, the minarets, the plaster, the museum decree and the 2020 reversal, happened inside that shell. Understanding the sequence is the difference between admiring a large old room and reading a building that has been argued over for fifteen hundred years.

What is the short version of Hagia Sophia's history?

Built as an Orthodox cathedral under Justinian I between 532 and 537. Held by Catholic crusaders from 1204 to 1261. Orthodox again until 1453, then an Ottoman mosque after the conquest. Secularised in 1934 and opened as a museum in 1935. Reconverted to a working mosque in July 2020.

Hagia Sophia during its decades as a museum
Hagia Sophia during its decades as a museum

Six changes of status, and each one is visible somewhere in the building. That is what makes it unusual. Most contested monuments get erased and rebuilt by whoever wins. Here the Ottomans plastered over figural mosaics rather than destroying them, twentieth-century restorers uncovered a good number of them, and the current arrangement screens some during prayer with curtains rather than covering them permanently.

The name is Greek and it is not a person. Hagia Sophia means Holy Wisdom, a title of Christ rather than a saint called Sophia. In Turkish it is Ayasofya, and both forms appear on street signage across the city, which catches out first-time visitors looking for the wrong word on a sign.

For nearly a thousand years after 537 it was the largest cathedral in the world, and it remained the reference point that later architects measured themselves against. That reverence is not an abstraction. The imperial mosque raised a few kilometres away a thousand years later borrowed its central geometry outright, which is the whole subject of the comparison between Süleymaniye Mosque and Hagia Sophia.

Hagia Sophia, the full sequence
PeriodStatusUnder whom
532 to 537Construction of the current buildingJustinian I
537 to 1204Eastern Orthodox cathedral, seat of the Patriarch of ConstantinopleByzantine emperors
1204 to 1261Roman Catholic cathedralLatin rulers after the Fourth Crusade
1261 to 1453Eastern Orthodox cathedral againRestored Byzantine emperors
1453 to 1934Imperial mosqueOttoman sultans, from Mehmed the Conqueror
1934 to 2020Secularised, then a museum from 1935The Turkish Republic
2020 onwardWorking mosque, with a ticketed visitor routeCurrent administration

Why did Justinian build it, and what made the dome so radical?

Emperor Justinian rebuilt Hagia Sophia after riots destroyed the previous church on the site, and he built it to be unmatched. The dome spans 31 metres and sits on a ring of forty windows, so the light cuts underneath it and the masonry above appears to hover. Nothing that size had been attempted over an open square.

Hagia Sophia's dome and interior
Hagia Sophia's dome and interior

The design solved a problem Roman builders had mostly avoided: how to set a round dome on a square plan without the corners fighting it. The answer was pendentives, curved triangular sections that carry the dome's load down into four piers, with two half-domes extending the space east and west. That arrangement is why the interior reads as one continuous volume rather than a series of rooms, and it is the geometry every later Ottoman architect studied.

The windows are the trick that makes it feel impossible. Piercing the base of a dome is structurally the last thing you would want to do, since that ring carries the outward thrust. Forty openings there means the light arrives in a band exactly where the eye expects solid support, and the dome appears disconnected from the building holding it up. Standing in the gallery, that is the effect people struggle to describe afterward.

It was also, by the standards of its own century, over-reaching. The original dome partially collapsed twice during the Byzantine period, and the repairs left the structure less symmetrical than the drawings suggest. That history of failure is precisely what a later architect would study before designing his own answer to it.

Justinian's building, by the numbers
DetailFigure
Built532 to 537, five years
First service27 December 537
Dome diameter31 metres
Windows at the dome baseForty, in a continuous ring
Held the title of largest cathedralFor nearly a thousand years
Partial dome collapsesTwice during the Byzantine period
Visitors today17,000 to 20,000 a day in peak season

What happened in 1204, when the Fourth Crusade took Constantinople?

A crusader army that had set out for Egypt sacked Constantinople instead. From 1204 to 1261 Hagia Sophia was a Roman Catholic cathedral under Latin rule, its treasury stripped and its relics dispersed across Europe. The Byzantines retook the city in 1261 and restored Orthodox worship, but the building never recovered its wealth.

Hagia Sophia in Istanbul
Hagia Sophia in Istanbul

The 1204 sack is the hinge event that most visitors have never heard of, and it explains more about the interior than the 1453 conquest does. Three days of looting removed the accumulated donations of seven centuries. Silver, gold, icons and relics went west, much of it to Venice, and the Byzantine state that limped back into the city in 1261 could not replace any of it.

What the Latin period did leave behind is the Deesis mosaic, dated to around 1261 and set in the upper gallery. Christ appears between the Virgin Mary and John the Baptist, both turned toward him in intercession. The lower portion has deteriorated badly, but the surviving faces are extraordinary, and scholars read the modelling of them as a forerunner of Renaissance naturalism. It is the single best reason to slow down in the gallery.

The layered detail is easy to miss without context, which is one honest argument for booking a guided visit rather than walking through alone. The comparison between the two approaches is set out in the guide on guided vs self-guided visits.

Who was Enrico Dandolo, and where is his marker inside?

Enrico Dandolo was the Doge of Venice who led the Fourth Crusade against Constantinople in 1204. He died in the city in 1205 and was buried inside Hagia Sophia. A marble floor slab in the south gallery, inscribed with his name, marks the spot, a short walk from the Deesis mosaic.

The Deesis mosaic in Hagia Sophia's upper gallery
The Deesis mosaic in Hagia Sophia's upper gallery

There is no monument, no effigy, nothing that announces itself. Just a rectangle of marble set into the gallery floor with lettering worn by centuries of feet, which is why most visitors walk over it without a glance. Knowing it is there changes the room. The man commemorated in the floor of the Orthodox cathedral is the man whose army stripped it.

What became of the actual remains after 1453 is disputed. Various accounts circulate and none is settled, so the honest description is that the marker is genuine and visible while the burial's later fate is not documented reliably. That ambiguity is fitting for a building where almost every surface carries a contested claim.

Find the Deesis first, then look down and around within a few paces. The slab and the mosaic sit in the same stretch of the south gallery, which makes them a natural pair to visit together. More of the gallery's landmarks are mapped out in the guide to what to see inside Hagia Sophia.

The Byzantine survivals and where they are
WhatWhereWhat it shows
Deesis mosaic, around 1261Upper gallery, south sideChrist between the Virgin and John the Baptist
Empress Zoe mosaicUpper galleryAn imperial couple flanking Christ, with an altered head
Komnenos family portraitUpper galleryAn imperial family with the Virgin and Child
Apse mosaic of the Virgin and ChildGround floor, visible from the galleryThe earliest major figural mosaic on view
Enrico Dandolo markerSouth gallery floorThe Venetian doge who led the 1204 sack
Viking runic graffitiGallery balustradeScratched by a Varangian Guard mercenary, one reading roughly "Halfdan was here"

What changed in 1453 when it became a mosque?

Mehmed the Conqueror took Constantinople in 1453 and converted the cathedral to a mosque immediately. Over the following centuries the Ottomans added a mihrab, a minbar, calligraphic medallions and four minarets, built by different sultans at different times. Figural mosaics were plastered over rather than destroyed, which is why so many survived.

Hagia Sophia in Istanbul
Hagia Sophia in Istanbul

The conversion was fast and the additions were slow. What arrived first was function: a mihrab niche indicating the direction of Mecca, a minbar for the sermon, and the reorientation of a building whose whole axis had been built for a different rite. The four minarets went up piecemeal across reigns, which is why they differ from each other in detail and why none of them is original to Justinian's structure.

The plaster is the part worth dwelling on. Islamic practice avoids figural imagery in a place of prayer, and the straightforward option would have been removal. Instead the mosaics were covered. Some were lost to earthquakes, damp and later repairs, but a substantial number survived under the plaster for four and a half centuries and were uncovered by twentieth-century restorers. The building's Christian art exists today because of a decision taken by its Muslim custodians.

Ottoman patronage did not stop at conversion. Sultans were buried in mausoleums beside the building, the calligraphic medallions inside are among the largest in the Islamic world, and within a decade of the conquest Mehmed began the palace next door. The story of that palace is covered in the guide to visiting Topkapi Palace.

Why did it become a museum in 1935, and what did that change?

The Turkish Republic secularised the building in 1934 under Atatürk and opened it as a museum in 1935. Prayer stopped, the tourist route opened, and restorers uncovered mosaics that had been under plaster since the conquest. For 85 years it was neither a church nor a mosque but a monument administered by the state.

The decision belonged to a broader programme of separating religion from public institutions in the new republic, and Hagia Sophia was its most visible expression. Turning the single most charged building in the country into a neutral museum was a statement about what kind of state Turkey intended to be.

Practically, the museum era is what produced the interior visitors recognise from photographs. Restoration campaigns uncovered the Deesis and other panels, carpets came up off the floor, and the building was presented as an archaeological object with all of its layers on show at once: Byzantine gold beside Ottoman calligraphy, in the same sight line, with nothing screened.

That period also set expectations that no longer hold. A guidebook written during the museum years describes free wandering across the ground floor, no dress requirements and no prayer closures. Anything you read that assumes museum status is describing a building that stopped existing in 2020.

What each status meant for a visitor
StatusYearsWhat a visitor could do
Orthodox cathedral537 to 1204, 1261 to 1453Attend the liturgy of the imperial church
Catholic cathedral1204 to 1261Latin rite under crusader rule
Imperial mosque1453 to 1934Prayer; figural mosaics under plaster
Museum1935 to 2020Free movement across the whole floor, no dress code, no prayer closures
Working mosque2020 onwardUpper gallery on a ticket, dress code enforced, Friday midday closed to tourists

What did the 2020 reconversion change for visitors?

In July 2020 the building returned to service as a working mosque. Since January 2024, foreign visitors pay 25 euros for a route through the upper gallery only, the ground floor is reserved for worship, a dress code applies, and the building closes to tourists every Friday from 12:00 to 14:30 for congregational prayer.

The single biggest practical change is where you stand. Tourists no longer walk the nave. The route goes up a ramp on the northeast side and delivers you to the gallery, from which you look down on the prayer floor. More than half of first-time visitors report being surprised by this, usually because they read something written during the museum years.

The mosaics have not been destroyed or plastered again. Panels visible from the prayer floor are screened during prayer times using movable curtains, and the gallery route still passes the Deesis, the Empress Zoe panel and the Komnenos portrait. What you can see from the gallery on an ordinary weekday morning is essentially what was on view during the museum decades, viewed from higher up.

The other change is the guiding rule. Since 2024, professional guides are not permitted to lead commentary inside the visiting area, so tours brief outside and accompany you in. An AR audio guide in 23 languages comes with the ticket. If you want the history delivered by a person rather than an app, an exclusive private Hagia Sophia tour with skip-the-ticket-line entry keeps the briefing to your own party, listed around $60 with a 5.0 rating on the operator's listing. Check the live listing for the current rate.

Practicalities that follow from mosque status
RuleDetail
Entry fee25 euros for foreign visitors since January 2024; under 8s free with ID
Where tourists goUpper gallery only; the ground floor is for worship
Friday closure12:00 to 14:30, no tourist entry regardless of ticket type
DressShoulders and knees covered; women wear a headscarf; shoes off on carpet
Museum Pass IstanbulNot valid, any tier
Guides insideNot permitted to lead commentary since 2024; AR audio guide included
PhotographyAllowed without flash; not of people at prayer

Where can you see each layer of the history today?

Byzantium is in the mosaics and the marble; the crusader century is in the Dandolo slab; the Ottoman period is in the medallions, the mihrab and the minarets; the museum decades are in the uncovered panels themselves. The gallery route passes all four in about forty-five minutes of walking.

Read the room in that order and it stops being a jumble. Look up first at the dome and the window ring, which is Justinian. Look across at the calligraphic medallions, which are Ottoman and enormous. Look down at the floor for the Dandolo marker, which is 1205. Then look at the mosaics themselves and remember that you are seeing them only because restorers in the twentieth century took plaster off.

Two smaller things reward the effort of finding them. The Viking runic graffiti scratched into a gallery balustrade by a mercenary of the Varangian Guard, one inscription reading roughly "Halfdan was here", is a reminder that Byzantine emperors employed Scandinavian bodyguards. And the Marble Door, worn smooth on the gallery route, has been walked through by every one of these regimes in turn.

As of early 2026 there is scaffolding near the centre of the nave for ongoing structural work. Visitor reports confirm it does not block the major gallery mosaics, and the dome remains largely readable from the gallery, but it does affect photographs looking across the space.

The building's neighbours, by patron and date
BuildingPatronBuiltStatus today
Hagia SophiaJustinian I532 to 537Working mosque, ticketed gallery route
Basilica CisternJustinian I530s to 540sTicketed monument
Topkapi PalaceMehmed the Conqueror onwardFrom the 1460sMuseum complex, closed Tuesdays
Süleymaniye MosqueSüleyman the Magnificent1550 to 1557Working mosque
Blue MosqueSultan Ahmed I1616Working mosque, free entry between prayers

How does the history affect what you can actually do inside now?

Mosque status sets the rules. Shoulders and knees covered for everyone, a headscarf for women, shoes off on the carpeted sections, no photographs of people praying, and a hard closure on Friday from 12:00 to 14:30. None of these were requirements during the museum decades, which is why older advice misleads.

The dress code is enforced more consistently here than at many working mosques in the city, and being turned back at the entrance costs at least twenty minutes. Scarves are sold at the door for about a euro and run out at peak times, so carrying your own is the simple fix. The full set of requirements, including what happens with shoes and bags, is laid out in the dress code rules guide rather than repeated here.

Prayer times shape the day more than the clock does. Friday midday is the absolute stop. The five daily prayers restrict rather than suspend tourist access, with barriers moved and staff directing flow, and the practical effect for someone in the gallery is usually minor. Planning around the Friday window is what actually matters.

One thing that helps is knowing what you are looking at before you arrive, because the building offers very little explanation of itself in situ. A private full-day tour of Istanbul's wonders covers the history across several sites in one day, listed around $80 with a 5.0 rating on the operator's listing. For a version that concentrates on the old city, a full-day private guided tour covers the same ground at a slower pace. Check the live listings for current rates.

How do you read fifteen centuries in a single visit?

Give it 90 minutes rather than 60, decide in advance which three things you want to stand in front of, and take them in chronological order rather than the order the route presents them. Most visitors leave saying they moved too fast, particularly past the Deesis, which needs a few minutes of standing still to register.

The gallery is a U-shaped route that looks compact on a plan and contains more than a museum floor of the same size. Pace is the thing people misjudge. Arriving at opening buys you the quiet needed to actually stop, and in the summer season the doors open at 08:00, which is the best hour of the day in the building by a wide margin.

Choose your three before you go in. A reasonable set for a first visit: the dome and its window ring for Justinian, the Deesis for Byzantium at its artistic peak, and the Dandolo slab for the century that broke the empire. Everything else becomes a bonus rather than a checklist you failed to complete.

A 90-minute route through the gallery, in historical order
OrderWhat to findWhich century it belongs to
1The dome and its ring of forty windows, from the gallerySixth, Justinian's engineers
2The apse mosaic of the Virgin and Child, seen from aboveByzantine, on the floor below the tourist route
3Viking runic graffiti on the balustradeAround the ninth, a Varangian guardsman
4The Deesis mosaicAround 1261, after the Latin occupation
5The Enrico Dandolo floor slab, a few paces away1205, the Fourth Crusade's aftermath
6The calligraphic medallions and the mihrab belowOttoman, after 1453

If you want the comparison with the building across the square, the head-to-head on Hagia Sophia versus the Blue Mosque sets out how differently the two read: one layered and argued over, the other unified and serene. Formats, group sizes and prices for guided visits sit side by side on Hagia Sophia Tours.

The last thing worth saying is that the building is not finished changing. It has been a cathedral twice, a mosque twice, and a museum once, and each of those turns was contested at the time. What you visit in 2026 is the current settlement, not a permanent one, which is a reasonable argument for going while the terms of access are what they are.

Frequently asked questions

When was Hagia Sophia built and by whom?

The present building went up between 532 and 537 under the Byzantine emperor Justinian I, with the first service held on 27 December 537. It replaced an earlier church on the same site that was destroyed in riots.

Why did Hagia Sophia become a mosque?

Mehmed the Conqueror took Constantinople in 1453 and converted the cathedral to a mosque immediately, as the principal place of worship of the new Ottoman capital. It served as an imperial mosque until 1934.

Is Hagia Sophia a church, a mosque or a museum today?

A working mosque. It was secularised in 1934, opened as a museum in 1935, and reconverted to a mosque in July 2020. Tourists visit the upper gallery on a separate ticket while the ground floor is reserved for worship.

Are the Christian mosaics still visible?

Yes. Panels visible from the prayer floor are screened with movable curtains during prayer times rather than covered permanently, and the upper gallery route still passes the Deesis, the Empress Zoe panel and the Komnenos portrait. Many survived at all because the Ottomans plastered over them in 1453 instead of removing them.

Is Enrico Dandolo really buried in Hagia Sophia?

The Venetian doge who led the Fourth Crusade died in the city in 1205 and was buried inside the building. A marble floor slab bearing his name in the south gallery marks the spot. What happened to the remains after the 1453 conquest is historically disputed, but the marker itself is real and visible.

What does the name Hagia Sophia mean?

Holy Wisdom, from the Greek. It is a title of Christ rather than the name of a saint. The Turkish form is Ayasofya, and both appear on signage around Istanbul.

Hagia Sophia tours that fit this trip

Booked through the operators' own listings, with live prices and free-cancellation windows shown there.

Exclusive Private Hagia Sophia Tour – Skip the Ticket Line

Hagia Sophia has seen it all – Byzantine cathedral, Ottoman mosque, museum, and mosque again – and this private tour lets you unpack those layers with a guide who knows the building inside out. You’ll wander under the massive floating dome, spot Christian mosaics peeking through Islamic calligraphy, and hear the stories behind its wild changes over 1,500 years, right up to the recent return to active mosque status. No big group, no rush – just your party and an expert who makes the history feel alive while you stand in the very spots where emperors and sultans once did. The kind of visit that turns a famous landmark into something you really understand.

  • 5
  • 1,142+ booked

Istanbul Wonders: Private Full-Day Guided Tour

Sultanahmet Square crams more history into one spot than most cities manage altogether, and this private day lets you explore it your way with a guide who knows the hidden stories. The Blue Mosque’s royal Iznik tiles glow soft blue inside, almost unreal. Across the square, Hagia Sophia’s massive dome and golden mosaics still wow after 1,500 years as cathedral, mosque and museum. Topkapi Palace feels like a sultan’s fairy tale – lush courtyards, treasure rooms and harem secrets. Down below, the Basilica Cistern’s dim columns and water echo that eerie Inferno vibe. Finish in the buzzing Grand Bazaar – 4,000 shops full of carpets, leather, jewelry and ceramics where bargaining is half the fun. Private vehicle and dedicated guide with hotel pickup mean no rush, no crowds, just the highlights tailored to you.

  • 5
  • 7 hours
  • 633+ booked

Full-Day Private Guided Tour of Historic Istanbul

Istanbul’s history hits you all at once – Byzantine churches next to Ottoman palaces, ancient markets buzzing like they’ve never stopped. This private day puts you right in the middle with a guide who knows the stories behind every stone. You’ll step into Hagia Sophia’s massive dome where emperors were crowned and sultans prayed, wander Topkapi Palace’s lush courtyards full of sultan secrets, feel the energy of the Grand Bazaar with its endless lanes of spices and lamps, and stand in the Blue Mosque surrounded by hand-painted tiles that glow blue in the light. The Hippodrome’s ancient obelisks and Basilica Cistern’s echoing columns round it out. All at your own pace, no big crowds, just your group and a local who makes the city’s layers feel alive. The kind of day that turns Istanbul from a destination into something you’ll carry with you.

  • 4.9
  • 8 hours
  • 1,364+ booked
Skip the line, limited daily entry Check availability →