Hagia Sophia mosque (Aya Sofya camii): history, legends, opening hours

Hagia Sophia (Turkish Aya Sofya) a.k.a Church of Holy Wisdom is a cathedral built in the 6th century in Constantinople by Justinian I. This shrine is considered one of the most significant structures preserved from the time of Byzantine Empire.
You can find great Hagia Sophia museum in the center of Old Town — near the Hippodrome Square (today — Sultanahmet). Here it’s stands through the centures watching historical events go by.
So let’s make a tour and find out some interesting facts and legends about this enormous architectural marvel.
Today, Hagia Sophia became a mosque — Ayasofya-ı Kebir Camii, but partly it’s a museum.
History of Hagia Sophia
History of the church creation

Aya Sofya mosque
To build this unique cathedral, the Byzantine ruler Justinian hired two great architects of that time: Isidore of Miletus and Anthimius of Thrall. They were assisted by another hundred architects, each of whom led 100 masons. In total, 10,000 workers were involved in the construction of cathedral (5,000 people on each side). Justinian personally supervised the progress of construction and paid salaries to workers daily.
Building lasted 5 years. Result was the largest structure that existed as a Christian church for about a thousand years. Later, crusaders invaded Constantinople and took part of relics stored in cathedral (at the moment they are in Venetian St Mark`s Basilica).
Hagia Sophia being a mosque
In 1453, Constantinople was recaptured by Ottoman army, led by Mehmed the Conqueror. Soon, church was converted into a mosque with a wooden minaret.
After a while, mosque was supplemented with new minarets, placing them in the corners of building. Last two minarets were built in the 16th century by eminent architect Sinan.
Since then, mosque has become one of the world’s Islamic shrines, and later Hagia Sophia was proclaimed the main mosque of Istanbul. In its image, many famous mosques were built.
Hagia Sophia today

The entrance to Hagia Sophia
In 1935, on the initiative of Ministerial Council and M.K. Ataturk, it was decided to open a museum in the cathedral. About 10,000 people visit it daily. And in 2013, a record for attendance was set: the museum was visited by more than three million tourists.
Of particular value are the mosaic paintings of cathedral, which give a general idea of the events of those times. Since 1985, Hagia Sophia has been a UNESCO World Heritage Site.
Interesting Facts
Construction of cathedral dome became the cause of a real revolution in the architecture`s history (its parameters are almost 55 meters high and 35 meters wide). On four sides of dome are minarets that have been preserved since the Ottoman Empire.
Much of the Christian mosaic placed in upper galleria: during the Byzantine and Ottoman Empires, only women lived in this part of cathedral.
The architect, who built two minarets in the cathedral, was so impressed with the size of Hagia Sophia that he tried to build something more grandiose all his life. And he succeeded! He built a stunning mosque in Edirne, the dome of which is slightly larger than that of the cathedral.
The Dungeons of Hagia Sophia

The dungeons of Hagia Sophia
In 1937, active exploration of the dungeons under Hagia Sophia began. But the Second World War prevented research. In 1945, the work continued with pumping water from the space under the cathedral. But all efforts were in vain. The most powerful pumps burned down, but the water level did not change. Therefore, the study was suspended for many years.
Decades later, new research began on the wells located under and around the temple. The scientists wanted to establish the functionality of underground tunnels and water supply systems. During the research, 9 wells were found located under the cathedral and in the surrounding area. 5 of the 9 tanks found were filled with water. In addition, a tunnel system was discovered that allows to ventilate the space and reduce humidity levels.

The tunnels under Hagia Sophia
There was no definite information about the graves under St. Sophia. The divers found several graves under the cathedral, including the tomb of Saint Antigen, the first person buried in St. Sophia in the 13th century, as well as the tomb of Patriarch Athanasius. The team of researchers reached two narrow corridors about 70 cm high, passing through Sultanahmet Square and Topkapi Palace. Presumably, these corridors were used by the Byzantine emperor Theodosius II in the 5th century in order to leave the walls of the cathedral and return to it unnoticed, hidden from prying eyes.
Filmmaker and scientist Geksel Gulensoy has tried to uncover the secrets of St. Sophia that lie beneath the surface in his documentary. He and his team of two divers and four cavers dived underwater to learn more about the reservoirs associated with the Topkapi Palace and the underground cistern. Work began back in 1998, but it was not until 2009 that the 50-minute film «In the Depths of St. Sophia» was completed.
First, the reservoir at the entrance was explored. Its depth is 12 meters. At the bottom, covered with slime and silt, divers found two thick pieces of wood and a bucket that turned to dust at the first touch. A dozen flasks dated 1917 were found in the second tank. It was assumed that these flasks were left by British soldiers who wanted to collect holy water during the invasion of the city. Also found at the bottom were fragments from chandeliers, a chain with two rings on both ends, and pieces of stained glass. The chain with rings probably belonged to a prisoner who could end his life in a mysterious dungeon.
The Bogazici International Speleological Society conducted a search for tunnels under the main hall of St. Sophia. Two stone tunnels were discovered leading in the direction of Hippodrome Square (now Sultanahmet Square) and Topkapi Palace.
Both tunnels were 50 meters high and divided into two parts, but the passages were closed. One of the seekers, Aydin Menderes, moved towards the Topkapi Palace until he saw daylight between the stones. He filmed the moment of the approach to the palace courtyard. The researcher then returned to enter another tunnel leading to two rooms. Bones and broken jugs were found on the way. It was assumed that the finds were the graves of Saint Antineg, who was the first to be buried in St. Sophia, and Patriarch Athanasius.
The research permit was granted on the condition that everything found should be left in the same place and that there would be no changes to the structure of the building. Therefore, the sealed passages remained untouched. After coming to the surface, the drivers were examined with an X-ray machine by doctors to make sure that there were no foreign objects in their bodies that they could have secretly taken out.
The dungeons of Hagia Sophia today: when will they open to tourists?

The dungeons of Hagia Sophia
Who would have thought, but the dungeons and tunnels under St. Sophia’s Cathedral, abandoned for many years, began to be cleaned and prepared for restoration activities. This is great news that pleased us at the beginning of 2025. Allegedly, after the completion of the planned work, the underground spaces will be open to tourists. It has not yet been indicated which specific area will be available for tourist’s visits, but it is already interesting to even look at a small part of these mysterious rooms.
According to officials, the length of the underground structures is about 1 kilometer: there are tunnels, basements, and even a three-room tomb. It is planned to clean and bring all these structures into proper condition within one year.
The underground structures are the same age as St. Sophia, but the tombs themselves are even more ancient and date back to the IV century.
The tunnels of the dungeon are quite narrow — only one person can pass through them now. During the restoration work, it is planned to refine the space, providing a freer passage and electric lighting.
Hagia Sophia highlights

Great mosaics of Hagia Sophia
Amazing mosaic paintings, for example, a 13th-century mosaic depicting Christ, the Saint Mary and John the Baptist.
The meeting of two religions in one sanctuary: in the cathedral you can watch how one religion (Muslim) tried to surpass the other (Christian). Ancient mosaics on the Christian theme and Islamic inscriptions are preserved on the walls.

Mosaics of Hagia Sophia
A Crying Column, which is endowed with miraculous properties: a marble column inexplicably releases moisture and is able to fulfill wishes. Even Justinian experienced this healing power when he leaned against the column with a sore head and the pain passed. You too can wish what you want. To do this, insert your thumb into a special hole and, turning your palm 360 degrees, whisper a wish.
Handprint of the Sultan who conquered Constantinople. There is a legend that the Sultan rode into cathedral on a horse, and when he leaned his hand on the column, there remained an imprint of his palm. The imprint was high, because his horse was walking on a mountain of corpses.
The famous cat of Hagia Sophia

Hagia Sophia’s cat
The cat named Gli, who has been living in the cathedral for several years, was considered the talisman and the most popular pet in Istanbul. Unfortunetly, the cat died in 2020.
The striped, fluffy animal even had its own page in Instagram, where people admired its beauty against the background of the interior decoration of the cathedral. You could follow celebrity cat Gli on @hagiasophiacat Instagram profile.
Rumor has it that the cat was presented to the museum by a certain high-ranking official. Such a gift was made in memory of Mohammed’s beloved cat, with whom he did not part even during prayer.
How to get to Hagia Sophia, opening hours and entrance fee in 2025

The view to Hagia Sophia from Blue Mosque
As Hagia Sophia became a mosque and a museum, only the second floor is opened for tourists. Here you can enjoy the view of mosaics. Entrance fee is 25 euro.
Hagia Sophia can also be reached by T1 tram line that runs through Sultanahmet. You can see the cathedral dome from afar.