Turkish President Recep Tayyip Erdogan paid a surprise visit to Hagia Sophia on Sunday just days before the first Muslim prayers are to be held at the Istanbul landmark since it was reconverted to a mosque last week. In a brief inspection, Mr Erdogan took stock of the conversion work, his office said, providing pictures showing scaffolding inside the building. Diyanet, the country's religious authority, said Christian icons would be curtained off and unlit "through appropriate means during prayer times". It was unclear whether Mr Erdogan, who has long eroded the Muslim-majority country’s secularism, planned to be among about 500 worshippers to attend Friday prayers. Turkey's top court paved the way for the conversion in a decision to revoke the edifice's museum status, which was conferred nearly a century ago. The sixth-century building had been open to all visitors, regardless of their faith, since its inauguration as a museum in 1935. Last week, Diyanet said the building would continue to be open to all visitors outside the hours given over to prayer. The Unesco World Heritage site was built as a cathedral during the Byzantine empire but converted into a mosque after the Ottoman conquest of Constantinople in 1453. It became a museum in a secular reform by the modern republic's founder, Mustafa Kemal Ataturk. Mr Erdogan said last year it had been a "very big mistake" to convert the Hagia Sophia into a museum. The reconversion sparked anger among Christians and tension between historic foes and uneasy Nato allies Turkey and Greece. The EU and the US also condemned the move. Last week, the US said it was “disappointed by the decision”. Meanwhile, Greece has requested that the EU sanctions Ankara over the Hagia Sophia decision. In its response, the bloc will introduce sanctions against Turkey if the Unesco site is not reverted to a museum. The head of the World Council of Churches wrote to Mr Erdogan last week to express his "grief and dismay" over Turkey's decision. Justice and Development Party (AKP) deputy chair for foreign affairs, Cevdet Yilmaz, said on Saturday that reverting the building to a mosque "by no means negates its historical heritage". Mr Yilmaz said Turkey would "carefully" protect Hagia Sophia's historical heritage and keep it open to visitors of all faiths and nations.