Editor’s Note: This CNN series is, or was, sponsored by the country it highlights. CNN retains full editorial control over subject matter, reporting and frequency of the articles and videos within the sponsorship, in compliance with our policy.

Istanbul, Turkey CNN  — 

Whether you’re a believer or not, visiting Hagia Sophia is a spiritual experience. The architectural genius of this place of worship — which was built as a church in 537CE before its conversion into a mosque in 1453 — creates an illusion of vastness. It feels like the space starts to expand when you enter the building.

Acoustic alchemy transforms visitors’ murmurs into shimmering sounds, suspended weightless in the air, like echoes of a prayer in an ancient language.

The art inside the building is a testament to coexistence. There is no other place on Earth where Christian mosaics of saints and Byzantine rulers are juxtaposed with Islamic calligraphy, also known as Hüsn-i Hat — large roundels displaying the names of Allah (God), the prophet Mohammed and the four caliphs, the leaders of Islam following the death of Mohammed.

Today, Hagia Sophia is one of the world’s most extraordinary mosques — but it’s more than that. It’s also a symbol, a cultural phenomenon, and a monument.

Naturally, like most monumental structures, Hagia Sophia has its own mythology. Of the many stories about the building, some are true, some are exaggerations, and some are outright fantasies.

Bigger and better

The current Hagia Sophia was built in the 6th century when Constantinople — as Istanbul was then called — was the heart of the Orthodox Christian Byzantine Empire that emerged as Ancient Rome’s domination dwindled and ruled swathes of Europe and northern Africa, as far away as modern-day Spain, Libya, Egypt, and Turkey, until the city fell to the Ottomans in 1453.

The building we see today isn’t original, having been preceded by two earlier churches at the same location — which were themselves built over a pagan temple.

The first was said to have been commissioned by Constantine, the Roman emperor who converted to Christianity and moved the Roman Empire’s center to Constantinople, ushering in the Byzantine era.

Called “Magna Ecclesia” — Latin for “Great Church” — it was inaugurated by Constantine’s son, Constantius II, in 360 CE. It was later destroyed by followers of Saint John Chrysostom, a former archbishop of Constantinople who was banished from the city. Its second iteration was inaugurated in 415 CE by the emperor Theodosius II, but was burned down again in 532 CE.

The third church, today’s Hagia Sophia, was built by Justinian I, an ambitious emperor who ordered its construction on 23 February 523 CE.

If an anonymous historical source quoted in the “Istanbul Encyclopedia” by the 20th-century historian Reşad Ekrem Koçu is to be believed, Justinian wanted his church to be larger and more ornate than Jerusalem’s Temple of Solomon, the legendary resting place of the Ark of the Covenant, said to have been built in the 10th century BCE.

During its five-year construction, Justinian instructed his provincial governors to send the most exquisite artifacts from ancient ruins in their territories to Constantinople for use in Hagia Sophia.

This, apparently, did the job. That same anonymous source says Justinian was struck by awe when he first entered. He ran to the altar, looked up to thank God for giving him the chance to build such a wonder — and screamed, “I surpassed you, Solomon!”

It’s a wonderful story — but one that historian and Hagia Sophia expert Sedat Bornovalı says is untrue.

That anonymously sourced intel was written roughly 300 years after Hagia Sophia’s construction. The anecdote never appears in the works of Procopius, Justinian’s official historian, who also wrote a critical book about the emperor, “Secret History.”

“If these claims were true, we would see them either in ‘Buildings’ or in his ‘Secret History,’” says Bornovalı, who adds that Procopius would have written something stinging like, “The presumptuous man compared himself to the prophet Solomon.”

However, while his “Secret History” shows the historian’s disdain for Justinian and his wife, Procopius still writes about Hagia Sophia with admiration.

A legendarily expensive build

Whatever the motivations behind it, the cost of the project and the hurry to begin the construction of what was one of the megastructures of its time also have almost mythical status.

The price tag was said to be astronomical. In his book “The Fall of the Roman Empire, A New History of Rome and the Barbarians,” historian Peter Heather said Justinian paid “15-20,000 pounds of gold.” The “Istanbul Encyclopedia” of 1945 puts it at a more modest, but still breathtaking $75 million, equivalent to $1.3 billion today. That’s more than the $1 billion cost to rebuild Notre Dame.

The construction of the church started only weeks after the Nika Revolt, a devastating rebellion against Justinian that destroyed most of Constantinople, including the second Hagia Sophia.

Bornovalı thinks it’s possible that Justinian seized the property of his political opponents and collected a vast amount of taxes to finance the construction. “How it was possible to create such a complex design and resolve the logistical issues within [weeks] remains among the unanswered questions,” he writes in his book, “History’s Longest Poem.”

Not least because, he says, it “would have taken years to deliver the stones and other building materials.”

He thinks the budget and plans were probably ready, and Justinian took advantage of the aftermath of the Nika Revolt to start building Hagia Sophia where it is now.

“If the previous Hagia Sophia had not been destroyed, Justinian would have ordered a new version to be built elsewhere anyway,” says Bornovalı.

A mosque with Christian imagery

The shimmering mosaics are one of the finest examples of Byzantine artwork.

Under the Byzantines, Hagia Sophia became the hub of Orthodox Christianity and the last standing symbol of their empire. But in 1453, when Ottoman sultan Mehmed II (a.k.a. Mehmed the Conqueror) captured Constantinople, his victory paved the way for the Ottoman Empire, which would last until 1922.

To suggest to the world not only Islam’s superiority but also that the Ottomans were the true heirs of the Romans, Mehmed converted Hagia Sophia to a mosque — but kept its original name. Although “Hagia Sophia” sounds as if it was named for a Christian saint, it actually means “Holy Wisdom” in Greek.

After conquering Constantinople, the young sultan — he was only 21 — performed his first Friday prayer here, starting a tradition for all subsequent sultans of the Ottoman Empire.

“There were three steps that defined the reign of the sultans,” says Turkish historian A. Çağrı Başkurt. “The first is to take the throne in the palace, the second is to wield a sword in Eyüp [an historic district in Istanbul], and the third is to perform the first Friday prayer in Hagia Sophia.”

Mehmed also claimed the title “Caesar of Rome” (Qaisar-e-Rum or Kaiser-i Rum) upon taking Constantinople. His successors continued to use the title until Mustafa Kemal Atatürk abolished the sultanate in 1922, creating the modern state of Turkey a year later.

Protecting a unique cultural heritage

Mehmet II ended the Byzantine empire and paved the way for the Ottoman one. He converted Hagia Sophia into a mosque.

Hagia Sofia has withstood many revolutions, occupations, riots, plunderings, and natural disasters (its construction on a base of solid rock is said to have helped it survive earthquakes). Few buildings of its age have been preserved as flawlessly and in such a complete state.

The Ottoman dynasty, particularly Mehmed II, played a pivotal role in its preservation. “[Mehmed] told his army that if they conquer the city, the city is theirs for three days with the exception of Hagia Sophia,” says editor and urban researcher Hasan Mert Kaya.

Koçu writes in the “Istanbul Encyclopedia” that Mehmed didn’t order the Christian mosaics to be covered despite the fact that Islam bans figurative art in religious contexts.

However, a century later, sultan Suleiman I had them plastered over.

It’s thanks to the creation of the Turkish Republic created by Atatürk, a secularist, that we can see them today. In 1926, the authorities undertook a comprehensive renovation after European media claims that Hagia Sophia was in danger of collapsing.

The building was closed to the public in the early 1930s for restorations, then converted into a museum in 1935 as part of a decree by Atatürk. He also commissioned the uncovering and restoration of the Byzantine mosaics.

From mosque to museum… and mosque again

The Turkish government controversially converted the building back into a mosque in 2020. Hagia Sophia had previously been deemed a museum when the secular Turkish state was created.

In a controversial move, in 2020, it was converted back into a mosque. The decision, involving one of the city’s most important landmarks and a UNESCO World Heritage site, was criticized by international religious and political leaders, with UNESCO, the UN’s cultural agency, and the pope among those voicing concern, though the move did not prompt wide opposition within Turkey.

However, the second floor has been serving as a museum since 2024. Tourists can buy tickets to enter the gallery and see the prayer floor from up above. The Byzantine mosaics and images are still visible during visiting hours, and are covered with special lighting effects during worship and prayer hours.

Whether Hagia Sophia should be a mosque or a museum is still debated. While some argue it should be converted back to a museum and never used for worship, others, like urban researcher Kaya, think it should stay as a place of worship — though only up to a point.

“Hagia Sophia should be a building where only Friday prayers, Eid and, perhaps during Ramadan, tarawih prayers are performed — fulfilling its function as a place of worship symbolically, and where limited people are allowed in at once,” he says.

The prayers Kaya mentions are special ones for Muslims that have a greater meaning when performed with the community.

Besides all the preservation efforts over the years, it’s said that the Turks came close to completely leveling Hagia Sophia.

During the 1918-1922 occupation of Istanbul by the British, French, Italian and Greek armies who occupied the city after World War I after the Ottomans had sided with the losing German-led alliance — Tevfik Pasha, a Turkish elder statesman, threatened the British with destroying the building if they tried to convert it back into a church.

Hagia Sophia’s urban legends

It's said the building cost the equivalent of $1.3 billion in today's money.

Some stories about Hagia Sophia are obviously figments of the imagination, but even they serve a purpose.

One goes that when a catastrophic earthquake in the late 500s cracked the central dome, royal advisors and the clergy told Justinian that they read the stars, checked the prophecies, and that the last messenger of God, a new prophet, had been born in Arabia.

To fix the dome, they should prepare a special mortar. It should include the saliva of the young Prophet, Zamzam water (“holy” water from the Zamzam Well in Mecca), and soil from Mecca. According to the story, this “holy mortar” mix was duly created and the cracks in the Christian church fixed.

“These legends and myths surrounding Hagia Sophia bind people to it; they reinforce the perception that this is their mosque, their temple,” says Hasan Mert Kaya.

Today Hagia Sophia somehow stands in the center of a power struggle, a conflict reflected as much by the stories and legends of its past as its recent redesignation as a mosque

Başkurt says, “When we look at it from the perspective of the [sultan’s] subjects, Hagia Sophia has been defined as an absolute symbol of conquest.” It is still like that in the minds of many Muslim citizens of Turkey.

Today, Hagia Sophia is open to visitors like many other mosques in Istanbul, such as Sülemaniye, the Blue Mosque, and Fatih Mosque. While the 2024 introduction of a 25 euro ticket price may have raised eyebrows, 2025 saw the start of a three-year conservation project, which will restore the central dome — the most comprehensive works in nearly 1,500 years of history.

The works will enhance the building’s earthquake resilience while preserving the mosaics — meaning that visitors from all over the world can continue to flock to the place of “Holy Wisdom.”