Turkish President Recep Tayyip Erdogan announced Friday that the Hagia Sophia, one of the architectural wonders of the world, would be reopened for Muslim worship as a mosque, sparking fury in the Christian community and neighbouring Greece.

His declaration came after a top Turkish court revoked the sixth-century Byzantine monument's status as a museum, clearing the way for it to be turned back into a mosque.

In an address to the nation, Erdogan said the first Muslim prayers at the Hagia Sophia would be performed on July 24.

The sixth-century edifice -- whose stunning architecture is a magnet for tourists worldwide -- has been a museum since 1935, open to believers of all faiths
The sixth-century edifice -- whose stunning architecture is a magnet for tourists worldwide -- has been a museum since 1935, open to believers of all faiths AFP / Ozan KOSE

"God willing, we will perform Friday prayers all together on July 24 and reopen Hagia Sophia to worshipping," he said, assuring that it would open its door to all, including non-Muslims.

"Like all our mosques, the doors of Hagia Sophia will be wide open to locals and foreigners, Muslims and non-Muslims."

The UNESCO World Heritage site in historic Istanbul, a magnet for tourists worldwide, was first constructed as a cathedral in the Christian Byzantine Empire but was converted into a mosque after the Ottoman conquest of Constantinople in 1453.

Turks began celebrating after a top Turkish court revoked Hagia Sophia's status as a museum, clearing the way for it to be turned back into a mosque
Turks began celebrating after a top Turkish court revoked Hagia Sophia's status as a museum, clearing the way for it to be turned back into a mosque AFP / Ozan KOSE

Last year, 3.8 million tourists visited the monument.

The Council of State, Turkey's highest administrative court, unanimously cancelled a 1934 cabinet decision to turn it into a museum and said Hagia Sophia was registered as a mosque in its property deeds.

The landmark ruling could inflame tensions not just with the West and Turkey's historic foe Greece but also Russia, with which Erdogan has forged an increasingly close partnership in recent years.

Hagia Sophia is a UNESCO World Heritage site
Hagia Sophia is a UNESCO World Heritage site AFP / Ozan KOSE

Greece swiftly condemned the move by Muslim-majority Turkey as a provocation while the United States also expressed disappointment.

Turkish President Recep Tayyip Erdogan has in recent years placed great emphasis on the battles which resulted in the defeat of Byzantium by the Ottomans
Turkish President Recep Tayyip Erdogan has in recent years placed great emphasis on the battles which resulted in the defeat of Byzantium by the Ottomans POOL / Pavel Golovkin

"Greece condemns most firmly" the decision, said Prime Minister Kyriakos Mitsotakis, saying it "does not only impact relations between Greece and Turkey but also the latter's relations with the European Union, UNESCO and the global community as a whole."

For Greek Culture Minister Lina Mendoni, "the nationalism displayed by Erdogan... takes his country back six centuries."

The Russian Orthodox Church was equally scathing.

Celebrations as Turkey announces iconic Hagia Sophia will be reopened as mosque
Celebrations as Turkey announces iconic Hagia Sophia will be reopened as mosque AFPTV / Kadir DEMIR

"The concerns of millions of Christians were not heard," Church spokesman Vladimir Legoida told Interfax news agency.

The decision "shows that all pleas regarding the need to handle the situation extremely delicately were ignored," he said.

UNESCO chief Audrey Azoulay said she "deeply regrets" the decision made without prior dialogue with the UN's cultural agency.

Factfile on the Byzantine masterpiece of Hagia Sophia in Istanbul
Factfile on the Byzantine masterpiece of Hagia Sophia in Istanbul AFP / Robin BJALON

US State Department spokeswoman Morgan Ortagus stated that "we are disappointed by the decision by the government of Turkey to change the status of the Hagia Sophia."

The move was also condemned by the US Commission on International Religious Freedom as an "unequivocal politicisation" of the monument.

Erdogan urged everyone to respect Turkey's decision and said the issue of what purposes Hagia Sophia would serve "concerns Turkey's sovereign rights."

Hagia Sophia, which stands opposite the impressive Sultanahmet Mosque -- often called the Blue Mosque -- has been a museum since 1935 and open to believers of all faiths.

Transforming it from a mosque was a key reform under the new republic born out of the ashes of the Ottoman Empire.

Shortly after the court decision, Erdogan signed a presidential decree handing over the administration of "Hagia Sophia Mosque" to Turkey's religious affairs directorate known as Diyanet.

Erdogan has in recent years placed great emphasis on the battles which resulted in the defeat of Byzantium by the Ottomans, with lavish celebrations held every year to mark the conquest.

Muslim clerics have occasionally recited prayers in the museum on key anniversaries or religious holidays. In 2018, Erdogan himself recited a verse from the Koran at Hagia Sophia.

"The decision is intended to score points with Erdogan's pious and nationalist constituents," said Anthony Skinner of the risk assessment firm Verisk Maplecroft.

"Hagia Sophia is arguably the most conspicuous symbol of Turkey's Ottoman past -- one which Erdogan is leveraging to strengthen his base while snubbing domestic and foreign rivals," he told AFP.

A few hundred Turks carrying Turkish flags gathered outside Hagia Sophia shouting "Chains broken, Hagia Sophia reopened".

Police heightened security measures around the building, according to AFP journalists. Hundreds of worshippers performed evening prayers outside the building after the alteration to its status.

"It's been a dream since we were kids," said Erdal Gencler, an Istanbul resident.

"(Hagia Sophia) finds its true purpose again. We are very excited, proud, and hopeful that there will be beautiful services here," he added.

Fatma, a woman with tears in her eyes, said: "Of course I am crying. (Hagia Sophia) belongs to us."

Since 2005, there have been several attempts to change the building's status. In 2018, the Constitutional Court rejected one application.