Built in five years for the emperor Justinian and finished in 537, for nine centuries the greatest church in Christendom, for nearly five the imperial mosque of the Ottomans, then a museum, and since 2020 a mosque again. Its dome seems to hang from heaven on a ring of light.
Photo: Julian Lupyan, CC0, Wikimedia Commons
The story
In January 532 riots burned the centre of Constantinople, and the church that stood here with them. Six weeks later Emperor Justinian began a new one. Two scholars, Anthemius of Tralles and Isidore of Miletus, designed it. On 27 December 537 it was consecrated.
Its dome is about 31 metres across and 55 metres above the floor. For nearly a thousand years no building on earth had a larger covered space. The name means Holy Wisdom: it was never dedicated to a Saint Sophia.
On 29 May 1453 Sultan Mehmed II took the city and made the church his mosque. The Ottomans added four minarets. In 1934 the Turkish Republic made it a museum. In July 2020 a court cancelled that decision, and it became a mosque again.
What is here
The prayer hall on the ground floor is for worshippers and is free. Foreign visitors buy a ticket for the visitors' route through the upper galleries, with its own entrance on the east side. The tombs of the sultans and the courtyard are outside the paid route.
The interior from the galleryRonan Reinart, CC BY-SA 3.0
Visitors now see the building from the galleries upstairs. The prayer hall is below you. Look up: forty windows ring the base of the dome, and the light through them makes it seem to float. A writer of the time said it looked as if it hung from heaven on a golden chain.
The dome and the great discsMatthew Badger bad_germ, CC BY-SA 3.0
The great round discs on the walls, 7.5 metres across, carry the names of God, the Prophet Muhammad, the first four caliphs and the Prophet's grandsons, in gold on green. They were painted in the 1840s.
The Deësis, about 1261Photograph: Myrabella, Public domain
In the south gallery is the Deësis mosaic of about 1261: Christ between his mother and John the Baptist, asking mercy for the world. The lower half is lost. What remains is among the finest faces of Byzantine art.
Things people often get wrong
"It is the Blue Mosque." The Blue Mosque, the Sultan Ahmed Mosque, is the one with six minarets across the square, built in 1609–1616 to rival this building.
"The Ottomans destroyed the mosaics." Most were plastered or painted over, not destroyed. Many were uncovered in the 1840s and in the twentieth century. Some are now covered by curtains or lighting during prayers.
"It is the same building as the Saint Sophia in Harbin." Harbin's Russian church of 1907 took the name, as did cathedrals in Kyiv and Novgorod. The original is here.
"Tourists cannot go in." Since January 2024 foreign visitors enter by a separate door on the east side and see the building from the upper galleries, for a fee. Worshippers enter the prayer hall free.
Films, games and books
A scene of the James Bond film From Russia with Love (1963) is set and filmed inside Hagia Sophia, then a museum. The game Assassin's Creed: Revelations (2011) lets players climb its dome in the Constantinople of 1511. Orhan Pamuk, the Turkish Nobel prize winner, writes of it in his memoir Istanbul.
People who stood here
We searched Turkish and English sources for this list.
Justinian I (Byzantine emperor, 527–565)He rebuilt the church after the riots of 532 and is said to have cried on entering it, "Solomon, I have surpassed you!" He also gave Europe the code of Roman law.
Empress Zoe (Byzantine empress, died 1050)She is in a mosaic in the south gallery beside her husband, offering gifts to Christ. Her husband's head has been changed, probably more than once: she married three emperors.
Halfdan (a Viking)In the ninth century a Norse guard carved his name in runes on the parapet of the south gallery. It can still be read: "Halfdan carved these runes."
Sultan Mehmed II (Ottoman sultan, the Conqueror)He rode in on the day he took the city, 29 May 1453, and ordered the first Friday prayer here.
Mimar Sinan (Ottoman architect)In the 1570s he strengthened the building with heavy buttresses and built tombs for sultans beside it. He spent his life trying to equal its dome, and said he did it in Edirne.
Mustafa Kemal Atatürk (founder of the Turkish Republic)His government made the mosque a museum in 1934. It opened in 1935.
Pope Paul VI, Pope Benedict XVI and Pope FrancisPaul VI knelt to pray here in 1967, and Turkey objected. Benedict XVI visited the museum in 2006 and Francis in 2014.
Barack Obama (president of the United States)He toured the museum with Recep Tayyip Erdoğan on 7 April 2009 and stopped to stroke the building's famous cat, Gli, who lived here until 2020.
Go deeper: seven stops, from the ramp to the Viking's name
The visitors' route goes up a ramp to the galleries and round them. Allow an hour, and avoid prayer times.
1. Outside: a building of many ages
From the garden, September 2024Premeditated, CC BY-SA 4.0
From the square the building looks heavy and pink, propped by buttresses of many dates. The four minarets are each different: one of brick by Mehmed II, the others of stone, added later.
From the air: Topkapı, Hagia Irene, Hagia Sophia and the Blue Mosque, 2014VikiPicture, CC BY-SA 4.0
Beside it are the tombs of five sultans, with tiles of Iznik, and a fountain for washing before prayer.
2. The ramp
Arches of the galleryGryffindor, Public domain
The galleries were reached by a stone ramp, not stairs, so that the empress and her ladies could be carried up. You walk up the same ramp, worn smooth by fifteen centuries.
3. The dome from above
The dome and its ring of windowsSlyronit, CC BY-SA 4.0
The first dome was too flat and fell in an earthquake in 558. Isidore the Younger, nephew of the architect, rebuilt it six metres higher in 562. It has partly fallen twice since and been mended each time.
A six-winged seraph on a pendentiveJulian Fong, CC BY-SA 2.0
Look at the pendentives, the four curved triangles that carry the round dome on a square plan. Each holds a six-winged seraph. One face was uncovered in 2009 after being hidden for 160 years.
4. The mosaics of the south gallery
Christ in the DeësisPhotograph: Myrabella, Public domain
In the Deësis, the gold background is set at an angle so that it catches the light. The faces are made of tiny tesserae, some only a few millimetres across, shaded like paint.
Empress Zoe and Constantine IX with ChristPhotographer: Myrabella, Public domain
A few steps on, Empress Zoe and her husband Constantine IX stand either side of Christ. His face and the name above it are later than the rest: the mosaic was altered for a new husband.
Fossati drawing of the bishops in the tympanumGaspare and Giuseppe Fossati, Public domain
When the Swiss brothers Gaspare and Giuseppe Fossati restored the building for Sultan Abdülmecid in 1847–49, they uncovered the mosaics, drew them, and covered them again. Their drawings are how we know what is now lost.
5. The Viking's name
Runes carved by HalfdanNot home at English Wikipedia, Public domain
On the marble parapet in the middle of the south gallery, under glass, are scratched runes. Vikings served the Byzantine emperors as the Varangian Guard. One of them, bored during a long service, carved his name.
6. The apse: the Virgin and Child
The Virgin and Child in the apse, 867Photograph: Myrabella, Public domain
High in the half-dome at the east end sits the Virgin with the Child on her lap. It was unveiled on 29 March 867, after a century when images were banned. It is the oldest surviving mosaic in the building.
The omphalion, where emperors were crownedDosseman, CC BY-SA 4.0
On the floor below, seen from the gallery, is a square of coloured stone circles, the omphalion, where Byzantine emperors were crowned.
7. Out to the square, and the same years in China
At dusk, February 2013Arild Vågen, CC BY-SA 3.0
Cross the garden to the Blue Mosque and look back. In Ramadan a message in lights, a mahya, is strung between the minarets.
A mahya between the minarets, 2026Joseolgon, CC BY 4.0
The church was finished in 537, in the years of the Northern and Southern Dynasties in China (420–589), when Liang Wudi was building Buddhist temples in Jiankang. The city fell to Mehmed II in 1453, four years after the Ming (1368–1644) emperor Yingzong was captured by the Oirats at Tumu.
The dome still moves. Istanbul lies near a great fault, and engineers are strengthening the building. You may see scaffolding inside.
Meanwhile in the world
Year
Here
Elsewhere
537
The church is consecrated
The Northern and Southern Dynasties in China
867
The apse mosaic is unveiled
The Tang dynasty (618–907); the Diamond Sutra is printed, 868
1054
The Pope's envoy lays a bull of excommunication on the altar: East and West split
The supernova that made the Crab Nebula
1204
Crusaders sack Constantinople
Genghis Khan unites the Mongols, 1206
1453
Mehmed II takes the city
The end of the Hundred Years' War
1935
Opens as a museum
The Long March in China
2020
A mosque again
The pandemic
One line to remember: Holy Wisdom, not Saint Sophia; a church for 916 years, a mosque for 481, a museum for 85, and a mosque again.
Then and now
From the north-west, August 2024Julian Lupyan, CC0, Wikimedia CommonsFrom the air: Topkapı, Hagia Irene, Hagia Sophia and the Blue Mosque, 2014VikiPicture, CC BY-SA 4.0, Wikimedia CommonsThe old city from the air, 2022Hunanuk, CC0, Wikimedia CommonsFrom the garden, September 2024Premeditated, CC BY-SA 4.0, Wikimedia CommonsWith the fountain in the squareMustang Joe, CC0, Wikimedia CommonsThe T1 tram passing, March 2024Calistemon, CC BY-SA 4.0, Wikimedia CommonsAt night, 2024Premeditated, CC BY-SA 4.0, Wikimedia CommonsAt dusk, February 2013Arild Vågen, CC BY-SA 3.0, Wikimedia CommonsLights in the squareKirua, CC BY-SA 4.0, Wikimedia CommonsA mahya between the minarets, 2026Joseolgon, CC BY 4.0, Wikimedia CommonsThe interior from the galleryRonan Reinart, CC BY-SA 3.0, Wikimedia CommonsThe dome and the great discsMatthew Badger bad_germ, CC BY-SA 3.0, Wikimedia CommonsThe dome and its ring of windowsSlyronit, CC BY-SA 4.0, Wikimedia CommonsA six-winged seraph on a pendentiveJulian Fong, CC BY-SA 2.0, Wikimedia CommonsThe upper gallery, 2017Dosseman, CC BY-SA 4.0, Wikimedia CommonsThe north-east gallery, 2016Dosseman, CC BY-SA 4.0, Wikimedia CommonsArches of the galleryGryffindor, Public domain, Wikimedia CommonsLamps in the galleryDosseman, CC BY-SA 4.0, Wikimedia CommonsThe Deësis, about 1261Photograph: Myrabella, Public domain, Wikimedia CommonsChrist in the DeësisPhotograph: Myrabella, Public domain, Wikimedia CommonsThe Virgin and Child in the apse, 867Photograph: Myrabella, Public domain, Wikimedia CommonsEmpress Zoe and Constantine IX with ChristPhotographer: Myrabella, Public domain, Wikimedia CommonsThe Zoe mosaic, 2009Dosseman, CC BY-SA 4.0, Wikimedia CommonsRunes carved by HalfdanNot home at English Wikipedia, Public domain, Wikimedia CommonsThe omphalion, where emperors were crownedDosseman, CC BY-SA 4.0, Wikimedia CommonsA mosaic as drawn by the Fossati brothers, 1847–49Gaspare and Giuseppe Fossati, Public domain, Wikimedia CommonsFossati drawing of mosaic saintsGaspare and Giuseppe Fossati, Public domain, Wikimedia CommonsFossati drawing of the bishops in the tympanumGaspare and Giuseppe Fossati, Public domain, Wikimedia CommonsFossati drawing of more bishopsGaspare and Giuseppe Fossati, Public domain, Wikimedia CommonsHagia Sophia from the air, about 1928Walter Mittelholzer, Public domain, Wikimedia Commons
Local legends
These are stories people tell about this place. They are legends, not history, and each one says where it comes from.
LegendSolomon surpassed
Entering the finished church, Justinian is said to have cried, "Glory to God, who has thought me worthy of this work. Solomon, I have surpassed you!"
Source: A Byzantine tale, the Narratio, written some three hundred years later
LegendThe weeping column
In the north-west of the ground floor a column wrapped in bronze has a hole worn into it. Put in your thumb and turn your hand round: if your thumb comes out wet, your wish will come true, or your illness will be cured.
Source: Byzantine and Ottoman tradition; it is in the prayer hall, which visitors no longer enter
LegendThe priest in the wall
When the Turks broke in on 29 May 1453, a priest saying Mass carried the chalice into the wall, which closed behind him. He will come out to finish the Mass when the church is a church again.
Source: Greek folk tradition
Later, people who live here will be able to add the stories they grew up with, and say which of these they have heard.
Not certain, and where accounts conflict
Mosque, museum, or both?
Turkey's government and many Turks see the 2020 change as restoring the mosque of the conquest. UNESCO, Greece, many churches and some Turkish scholars regretted it. The building remains a World Heritage site, and Turkey says it is open to all.
What did Justinian's church look like inside?
The first decoration had no figures, only crosses and patterns in gold. Most figure mosaics are from after 843. How much of the first gold survives is studied and argued.
Checked 2026-11-12 The official site is in Turkish and English. It has no online ticket shop; tickets are sold at the visitors' entrance.
Tickets and hours
25 euros for foreign visitors in 2026, for the upper galleries.
Open daily from about 9:00 to 19:30. The visitors' route closes on Friday around noon prayer, roughly 12:00 to 14:30, and pauses at the other prayer times.
Last checked 2026-11-12. Istanbul guides checked against Turkish official announcements in 2026.
Booking from abroad
Official page in English Tickets for foreign visitors are sold at the visitors' entrance on the east side and by licensed sellers. Card and cash are accepted. The Museum Pass Istanbul is not valid.
Note Children under 8 enter free with a passport. Muslims who come to pray use the worshippers' entrance, free.
Checked 2026-11-12
Where to start
Tram T1 to Sultanahmet. The visitors' entrance is on the east side, towards Topkapı Palace, not the main door on the square.
Come at opening time. Queues for security grow by mid-morning.
Look at the outside from the garden between Hagia Sophia and the Blue Mosque, then go in.
Before you go
Dress code: shoulders and knees covered for everyone; women cover their hair. Scarves are sold at the entrance.
There is no cloakroom. Large bags and suitcases are not allowed.
Restoration work goes on. Parts may be behind scaffolding.
Customs and manners
This is a working mosque. Do not walk in front of people praying, and keep your voice low.
Do not point your feet at the prayer niche when you sit.
Photographs are allowed without flash, but not of people at prayer.
Many Greeks and Orthodox Christians feel deeply about this building. Turks feel deeply too. Speak about its history with care.
In Turkish, thank you is "teşekkürler" (teh-shek-kewr-LER).
Opening hours are given in the local time of the place. Prices are in the local currency. The figure after ≈ is approximate, at exchange rates checked on 9 November 2026, in .
Look for these
Count the windows at the base of the dome.
Find the seraph whose face was uncovered in 2009.
In the Zoe mosaic, find the husband's face. Does it fit?
Find Halfdan's runes.
How many minarets? Are they the same?
I am here
Stand at the site, sign in, press the button, and collect its stamp. Your browser will ask to use your location. It is sent to us once to confirm that you are at the site; we keep how far you were from it, not the spot where you stood.
Your stamps are saved to your account, so they follow you to any device. Checking from a browser cannot rule out every false location; stricter checks arrive with the app.
Messages
Share your photos
Photos here show the place, not people. Each one is credited to the visitor who took it and appears after our team has looked at it. A photo with you in it belongs under “I am here”.