Tensions between Egypt and Turkey are showing no sign of abating as Cairo's religious authority, Dar al-Ifta, referred to the Ottoman seizure of the city of Constantinople in 1453 as an "occupation".
The statement was issued on Sunday by Dar al-Ifta on its Facebook page in an attack on President Recep Tayyip Erdogan, who it accused of using religion to further his "colonial ambitions" abroad.More: Egyptian security forces raid Turkish news agency in Cairo Turkish president Erdogan denounces Egypt's Sisi over executions Erdogan: Turkey's role in the Middle East
"The Hagia Sophia was built as a church during the Byzantine period in AD537, and it remained for 916 years until the Ottomans occupied Istanbul [Constantinople] in 1453, turning the building into a mosque," said the Egyptian authority responsible for issuing religious edicts.
After the comments caused an uproar on social media, Dar al-Ifta issued a correction the following day.
"We have repeatedly confirmed with documents and evidence that Turkish President Recep Tayyip Erdogan continues to use fatwas as a weapon to install tyranny at home in the name of religion, and to justify his ambitions abroad in the name of an alleged caliphate," it said.
"As for the conquest of Constantinople, it is a great Islamic conquest that was preached by The Prophet, may God's prayers and peace be upon him, and it was carried out by the great Ottoman Sufi Sultan Mohammed al-Fateh," it continued, referring to Sultan Mehmet II.
"But Erdogan is not and has no connection to Mohammed al-Fateh."
The head of Turkey's religious authority, Ali Erbas, called Dar al-Ifta's statement "unfortunate and ugly".
Last year, the Turkish president pledged to revert the Hagia Sophia museum back into a mosque.
It was not the first time Egypt's religious authority accused Erdogan of using religion to impose Turkish hegemony on Arab countries that were previously colonised by the Ottoman empire.
"The Turkish president and his followers are not immune from using religious discourse in general, and fatwas in particular, as a cover for their military operations," it said in February.
Relations between Turkey and Egypt have been virtually non-existent since the Egyptian military, then led by President Abdel-Fattah el-Sisi, overthrew democratically elected president Mohamed Morsi - a close ally of Erdogan - in 2013. Ankara has not dispatched an ambassador to Cairo since then.
At the time, Erdogan said he would "never talk to someone like" el-Sisi and called for the release of Muslim Brotherhood prisoners in Egypt.
"There is an authoritarian system, even totalitarian," he said, referring to Egypt's government under el-Sisi.
The two countries have also been at odds over maritime jurisdiction and offshore resources in the eastern Mediterranean, and support opposing sides in Libya's conflict.