Turkey’s top administrative court on Friday announced its decision to revoke the Hagia Sophia's status as a museum, paving the way for 1,500-year-old former cathedral to be opened as a mosque again.
The widely expected decision comes despite expressions of concern from US, French, Russian and Greek officials, as well as Christian church leaders, over the move.
The Council of State, which was debating a case brought by a Turkish NGO, cancelled a 1934 cabinet decision and ruled the Unesco World Heritage site would be reopened for Muslim worship.
The United Nations' cultural body warned on Thursday that any change in the status of sixth-century building in Istanbul may have to be reviewed by its World Heritage committee.
The World Heritage site was built in the 6th century by the Byzantine emperor Justinian as a cathedral of the Greek Orthodox church before being converted to a mosque under the Ottoman empire nine centuries later. It was declared a museum in 1934 after the secular modern Turkish republic was established in 1923 and is one of Turkey's most visited monuments.
Unesco said the Hagia Sophia was on its list of World Heritage Sites as a museum, and as such had certain commitments and legal obligations.
"Thus, a state must make sure that no modification undermines the outstanding universal value of a site listed on its territory. Any modification must be notified beforehand by the state to Unesco and be reviewed if need be by the World Heritage Committee," the UN body told Reuters.
Unesco said it had expressed its concerns to Turkish authorities in several letters and conveyed the message to Turkey's ambassador to the institution on Thursday.
"We urge Turkish authorities to start a dialogue before any decision is taken that could undermine the universal value of the site," it said.
The Council of State’s 10th Chamber in Ankara had previously deferred announcing its decision on the issue on July 2.
An official from Turkish President Recep Tayyip Erdogan's ruling AK Party, which has Islamist roots, had said the decision "in favour of an annulment" was expected on Friday.
The move is seen by Mr Erdogan's critics as an attempt to divert attention from his economic and political troubles. The president had raised the idea previously ahead of municipal elections in March last year in which his party suffered several setbacks, including losing control of Istanbul.
Pro-government columnist Abdulkadir Selvi wrote in the Hurriyet newspaper that the court had already made the annulment ruling and would publish it on Friday.
"This nation has been waiting for 86 years. The court lifted the chain of bans on Hagia Sophia," he wrote.
The association that brought the case said Hagia Sophia was the property of Ottoman Sultan Mehmed II, who in 1453 captured the city, then known as Constantinople, and turned the already 900-year-old Byzantine church into a mosque.
Ecumenical Patriarch Bartholomew, the spiritual head of some 300 million Orthodox Christians worldwide and based in Istanbul, said a conversion would disappoint Christians and "fracture" East and West. The head of Russia's Orthodox Church said it would threaten Christianity.
US Secretary of State Mike Pompeo and Greece also urged Turkey to maintain the museum status.