Aya Sofia of Istanbul: History, Mosaics & Visitor Guide

Turkey

Aya Sofia stands at the centre of Istanbul’s Sultanahmet district as the only building that served three roles across fifteen centuries: Christian cathedral under Byzantine emperors from 537, Ottoman mosque from 1453 to 1934, museum from 1934 to 2020, and mosque again from July 2020. Commissioned by Emperor Justinian I and completed in just under six years – a feat of engineering that later architects took more than a thousand years to surpass – the building covered more interior floor space than any church in the world until the completion of Seville Cathedral in the 16th century. Modern visitors enter beneath the massive 31-metre dome that still ranks among the largest in the world unsupported by a central column.

This guide walks through Aya Sofia’s Byzantine origins under Justinian, the 1453 Ottoman conversion by Mehmed II, the 20th-century museum period, the 2020 return to Muslim worship, and practical visitor information covering hours, entrance rules, and the best routes for seeing the surviving Christian mosaics.

Byzantine Origins: 532-537 CE

Emperor Justinian I ordered Aya Sofia’s construction in 532, 39 days after the Nika riots destroyed the previous basilica on the same site. The project aimed to exceed every previous church in scale and complexity, and Justinian recruited two mathematicians-turned-architects from Asia Minor to design it: Anthemius of Tralles and Isidore of Miletus. They drew on Roman engineering traditions but solved a problem no Roman builder had cracked – how to place a vast circular dome on top of a square nave.

Their solution used four massive piers at the nave corners, connected by arches that transitioned into triangular pendentives. The pendentives carried the weight of the circular dome down to the piers while leaving the main floor unobstructed. Ten thousand workers built the cathedral in just under six years, opening in December 537 at a dedication ceremony attended by Justinian himself. Contemporary accounts record the emperor exclaiming that he had surpassed Solomon’s Temple.

Early Byzantine Aya Sofia served as the cathedral of the Patriarch of Constantinople, host of imperial coronations, and the setting for the 1054 mutual excommunications that split the Christian church into Orthodox and Catholic branches. Partial dome collapses in 558 and 989 required major reconstructions, each reinforcing the structure further. By the 12th century, Aya Sofia was considered the architectural marvel of the eastern Mediterranean.

Ottoman Conversion: 1453 Onwards

Sultan Mehmed II captured Constantinople on May 29, 1453, ending the Byzantine Empire. The same afternoon he rode to Aya Sofia, ordered Friday prayers to be held inside within three days, and began converting the cathedral into a mosque. The changes were substantial but restrained: Mehmed preserved most Byzantine mosaics by plastering over rather than destroying them, added four minarets across the following two centuries, installed a mihrab oriented toward Mecca (angled slightly from the church’s original axis), and removed the altar and iconostasis.

Ottoman sultans continued to embellish Aya Sofia across four centuries. Selim II added massive buttresses in the 1570s to stabilise the aging dome. Sultan Ahmed III commissioned a library in 1739 that still occupies a southern gallery. The eight large Arabic calligraphic roundels, inscribed with the names of Allah, Muhammad, the first four caliphs, and the Prophet’s two grandsons, date from an 1847-1849 restoration led by the Fossati brothers of Switzerland. Mustafa Izzet Efendi, one of the greatest Ottoman calligraphers, painted the originals by hand on roundels over 7 metres across.

The Fossati brothers’ restoration also briefly exposed some of the plastered-over Byzantine mosaics. Sultan Abdülmecid I allowed careful documentation of the images before they were re-covered with plaster out of respect for Islamic prohibitions on figurative decoration in mosques.

Museum Period: 1934-2020

In 1934, Turkish President Mustafa Kemal Atatürk signed the decree converting Aya Sofia from mosque to museum. The decision fit Atatürk’s broader secularisation programme, which had closed religious orders in 1925, adopted Western dress codes in 1925, and replaced Arabic script with a Latin alphabet in 1928. Aya Sofia’s museum status made it a showcase for Turkey’s cultural heritage and allowed public viewing of the Byzantine mosaics for the first time in 480 years.

Archaeological teams led by Thomas Whittemore of the Byzantine Institute of America removed Ottoman-era plaster from several key mosaics between 1932 and 1949. The surviving images include:

  • The 9th-century apse mosaic of the Virgin Mary and Christ Child
  • The Deesis mosaic in the upper gallery, showing Christ flanked by the Virgin Mary and John the Baptist, dated to around 1261
  • The portrait of Emperor Constantine IX and Empress Zoe flanking Christ, 11th century
  • The Empress Irene and Emperor John II Comnenus mosaic, 12th century
  • The southwestern vestibule mosaic showing Constantine and Justinian offering the city and the church to the Virgin Mary

During the museum period Aya Sofia attracted roughly 3 million visitors per year, making it one of Turkey’s top tourist sites alongside the Topkapi Palace and the Blue Mosque across the square. The museum era preserved both Christian and Islamic elements in visible coexistence.

Return to Mosque: 2020

Turkey’s Council of State annulled the 1934 museum decree on July 10, 2020. President Recep Tayyip Erdoğan signed a decree restoring Aya Sofia to mosque status the same day. The first Friday prayers after the change were held on July 24, 2020, with roughly 350,000 people attending inside and across Sultanahmet Square. The Byzantine mosaics remain visible outside of prayer times; during prayers they are covered with retractable curtains to comply with Islamic prohibitions on figurative images during worship.

The change produced international debate but preserved access for non-Muslim visitors. Aya Sofia remains open to tourists during most daylight hours, with the exception of Islamic prayer times when the building is reserved for worshippers. Entry, which had been paid under museum rules, became free in 2020. Turkey reintroduced paid tickets for non-residents in January 2024 at 25 euros per visitor, with Turkish citizens continuing to enter free.

Architecture and Notable Features

Aya Sofia’s main dome measures 31.24 metres in diameter and rises 55.6 metres above the nave floor. Forty ribs radiate from the dome’s apex, each with a small window at the base to flood the interior with natural light. Byzantine historian Procopius wrote that the dome appeared to float from a golden chain dropped from heaven, and modern visitors report similar impressions on clear mornings when light streams through the windows at angle.

Other architectural features to notice:

  • The Imperial Door at the main entrance, originally reserved for the Byzantine emperor, measures 7 metres tall and weighs several tonnes
  • The marble omphalion in the floor, where Byzantine emperors were crowned
  • Coloured marble columns shipped from quarries across the eastern Mediterranean, including green porphyry from Thessaly and red porphyry from Egypt
  • The Viking runic graffiti carved into a second-floor balustrade by a member of the Varangian Guard in the 9th century
  • The weeping column (Column of St Gregory) at the northwest corner, said to cure ailments when visitors place a finger in its damp central hole
  • The Sultan’s Lodge (Hünkar Mahfili), the private Ottoman prayer box used by sultans
  • The muvakkithane, a small building outside that once held the mosque’s astronomical clocks and Islamic calendar tools

Visitors should allow at least 90 minutes inside to see both ground floor and upper gallery. The upper gallery, reached by a cobbled ramp rather than stairs, holds most of the surviving Byzantine mosaics.

Visitor Information

Aya Sofia stands at the centre of Istanbul’s old city, directly opposite the Blue Mosque (Sultan Ahmed Mosque) across Sultanahmet Square. The tram line T1 connects the building to Eminönü, Karaköy, and Kabataş with a stop called Sultanahmet two minutes walk from the entrance. Taxis from Taksim Square take 15-25 minutes depending on traffic.

Current visiting rules:

  • Opening hours: roughly 9 am to 7 pm outside prayer times, varies by season
  • Entry fee: 25 euros for non-Turkish citizens (as of 2024 reform), free for Turkish citizens and Muslim worshippers
  • Dress code: modest clothing, shoulders and knees covered, no shorts. Women may bring a scarf or borrow one at the entrance
  • Shoes must be removed at the entrance (shoe bags provided)
  • Photography permitted outside prayer times, with some areas marked as off-limits
  • Prayer times close the building to visitors for roughly 30-40 minutes five times daily

Nearby sights for the same visit include the Blue Mosque, Topkapi Palace, Basilica Cistern, and the Archaeological Museum. For a fuller overview of Istanbul and its historic districts, see our Istanbul travel guide.

Aya Sofia in Literature and Culture

Aya Sofia has appeared in more travelogues and literary works than most buildings in history. Procopius’s 6th-century description in De Aedificiis remains the foundational Byzantine account. Orhan Pamuk, the Nobel laureate Turkish novelist born in Istanbul in 1952, references Aya Sofia throughout his memoir Istanbul: Memories and the City as the silent witness to his childhood neighbourhood.

The building’s religious identity shifts have also made it a frequent symbol in art and politics. Yeats’s 1927 poem Sailing to Byzantium imagines the Byzantine city’s mosaics as the soul’s destination; Pierre Loti and Edmondo De Amicis both wrote extensively about their 19th-century visits when Aya Sofia was still an Ottoman mosque. More recent fiction, from Dan Brown’s Inferno to Elif Shafak’s Three Daughters of Eve, uses the building as a narrative pivot. Few other sites carry the same weight across Christian, Islamic, and secular cultural imagination at once.

Frequently Asked Questions

Is Aya Sofia a mosque or a church?

Aya Sofia served as a Christian cathedral from 537 to 1453, an Ottoman mosque from 1453 to 1934, a secular museum from 1934 to 2020, and has been a mosque again since July 2020. Byzantine Christian mosaics remain visible in most areas except during Islamic prayer times.

Who built Aya Sofia?

Byzantine Emperor Justinian I commissioned Aya Sofia in 532 CE. Architects Isidore of Miletus and Anthemius of Tralles designed the building, and roughly 10,000 workers completed it in just under six years. The cathedral opened in December 537.

How old is Aya Sofia?

The current structure opened in 537 CE, making it nearly 1,500 years old. Two earlier churches on the same site, built under Constantius II (360) and Theodosius II (415), were both destroyed before Justinian’s version.

How much is the entrance fee to Aya Sofia?

As of 2024, non-Turkish visitors pay 25 euros. Turkish citizens and Muslim worshippers enter free. The fee reintroduction followed the 2020 reconversion to mosque status, replacing the previous museum-era admission ticket system.

Can non-Muslims visit Aya Sofia?

Yes, non-Muslim visitors are welcome outside of Islamic prayer times. The building closes to tourists for roughly 30-40 minutes during each of the five daily prayers. Modest dress is required for everyone, and shoes must be removed at the entrance.

What are the Byzantine mosaics in Aya Sofia?

Surviving mosaics include the Virgin Mary and Christ Child in the apse (9th century), the Deesis in the upper gallery (13th century), and several imperial portraits including Constantine IX with Empress Zoe, and Emperor John II Comnenus with Empress Irene. Most date from the period between iconoclasm’s end in 843 and the fall of Constantinople in 1453.

Sources and Further Reading

  • Byzantine Architecture – Cyril Mango, Electa
  • Hagia Sophia: A History – Robert G. Ousterhout, Harvard University Press
  • Istanbul: Memories and the City – Orhan Pamuk, Vintage Books
  • The Age of Justinian – Michael Maas (ed.), Cambridge University Press
  • Hagia Sophia official information – Turkish Ministry of Culture ktb.gov.tr