An imam led a prayer in front of the vast building that was once a Greek Orthodox basilica, then a mosque and now a museum before crowds called for it to be restored as a Muslim place of worship.
“Let the chains break, open Hagia Sophia,” chanted the crowds who gathered on the plaza in front of the museum, according to Turkey’s Dogan news agency.
“In the name of thousands of our brothers we demand to be allowed to pray inside the Hagia Sophia mosque,” said Salih Turhan, the president of the Anatolia Youth Association which organised the demonstration coinciding with celebrations for the anniversary of the Ottoman conquest of Constantinople.
Built in the sixth century, Hagia Sophia, which means Holy Wisdom in Greek, was converted to a mosque in 1453 when the Ottomans conquered what was then called Constantinople.
After the Ottoman Empire crumbled and modern secular Turkey was founded on its ruins, the mosque was transformed into a museum in 1935.
The edifice, a masterpiece of Byzantine architecture, features an immense dome supported by huge pillars, its walls sheathed with marble and decorated with mosaics.
After the city fell to the armies of Sultan Mehmet II The Conqueror, four minarets were added to the structure and the interior was decorated with Islamic art.
Since President Recep Tayyip Erdogan’s conservative ruling Justice and Development Party (AKP) came to power in 2002, advocates of Turkish secularism have feared that the Hagia Sophia could be transformed back into a mosque.