ON JULY 5th the mufti of Trabzon gathered with other citizens for the first Friday prayers of the holy fasting month of Ramadan, not at a mosque but at an ancient Byzantine church. The gathering was a symbolic re-enactment of the conquest in 1462 of this ancient Greek Black Sea port by Mehmet II, the Ottoman sultan who had wrested Constantinople from the Byzantines in 1453. He marked his victory by converting the Haghia Sophia cathedral of today’s Istanbul into a mosque.

Haghia Sophia’s sister of the same name in Trabzon is less grand. Yet with its dazzling frescoes and magnificent setting overlooking the sea, the 13th-century building is regarded as one of the finest examples of Byzantine architecture. As with other Christian monuments, the Haghia Sophia in Trabzon has become a symbol in the battle between secularists and Islamists. It was converted into a mosque around the 16th century and, after other incarnations, became a museum in 1964. But the Islamists won the last round in 2012 when a local court accepted the claim by the General Directorate of the Pious Foundations, the government body responsible for Turkey’s historic mosques, that the Haghia Sophia belonged to the foundation of Mehmet II and was being “illegally occupied” by the culture ministry.

The decision provoked surprising anger in a city notorious for its ultra-nationalist views. “It’s about erasing the Christian past, reviving Ottomanism,” says a local historian. “There are enough mosques in Trabzon, half of them empty, what was the need?” chimes in Zeki Bakar, a neighbourhood councillor. A lawsuit has been brought to undo the conversion.

Even so, the mildly Islamist Justice and Development (AK) government carried out the conversion in time for Ramadan. A red carpet now obscures exquisite floor mosaics. Shutters and tents beneath the central dome shield Muslim worshippers from “sinful” paintings of the Holy Trinity. Shiny steel taps with plastic stools for ablutions clutter a once-verdant garden filled with ancient sculptures.

Mazhar Yildirimhan of the Pious Foundations Directorate’s office in Trabzon shrugs off complaints as propaganda. But for experts the conversion is tragic, and will inevitably lead to damaging the building. “It seems to follow closely that of Haghia Sophia in Iznik,” warns Antony Eastmond of the Courtauld Institute of Art, referring to another conversion.

All this is prompting anxiety that the Haghia Sophia in Istanbul “will be next”. These fears are overdone. Restoration work on the famous basilica has continued under a decade of AK rule and Recep Tayyip Erdogan, the prime minister, has dismissed worries about its fate. Yet Mr Yildirimhan makes no secret of his desire for a conversion, which he says is shared by fellow Muslims. “It was ordained by the sultan,” he says. “We have all the records.”