According to organizers of the rally, more than 500 people took part in the demonstration on Friday, while police reported about only some 250 participants.
During the rally, its participants read a statement of Archbishop of Athens and All Greece Ieronymos II, who condemned the transformation of one of the most important symbols of the Orthodox Church into a mosque.
On Friday, a Muslim prayer took place in Hagia Sophia for the first time since 1934.
Earlier in July, Turkey's highest administrative court, the Council of State, annulled the 1934 decree converting Hagia Sophia into a museum, meaning it can now be used as a mosque. Turkish President Recep Tayyip Erdogan backed the move. The decision has produced negative reactions across the globe, including among the Greeks who attach special historical significance to the monument.
Hagia Sophia was founded by Byzantine Emperor Justinian as a cathedral and was opened in December 537. The cathedral, considered the epitome of Byzantine architecture, was one of the world's largest buildings for over a thousand years. After the capture of Constantinople by the Ottomans and the fall of the Byzantine Empire in 1453, the cathedral was converted into a mosque, but since 1934, the building, by a decree of the founder of the Republic of Turkey, Mustafa Kemal Ataturk, became a museum and was included in the UNESCO World Heritage List.