Turkey's president has recited an Islamic prayer in the Hagia Sophia, a historic Istanbul landmark that has become a symbol of interfaith and diplomatic tensions.

Speaking for an art festival opening Saturday, President Recep Tayyip Erdogan recited the Quran's first verse, dedicating the prayer to the "souls of all who left us this work as inheritance, especially Istanbul's conqueror."

The Hagia Sophia was built during the 6th century Christian Byzantine Empire and served as the seat of the Greek Orthodox Church. It was converted into an imperial mosque with the Ottoman conquest of Istanbul in 1453.

Turkey's secular founder made the structure a museum in 1935, but there have been discussions by Erdogan's Islamic-leaning government about converting it back into a mosque.

Greece has protested the Turkish government's religious use of the venue.