The Council of State threw its weight behind a petition brought by a religious group and annulled a 1934 cabinet decision that changed the 6th century building into a museum. The ruling allows the government to restore the Hagia Sophia’s previous status as a mosque.
The decision was in line with the Turkish president’s calls to turn the hugely symbolic world heritage site into a mosque despite widespread international criticism, including from the United States and Orthodox Christian leaders.
The decision could deepen tensions with neighboring Greece, which also called on Turkey to maintain the structure’s status as a museum.
The religious group had contested the legality of the 1934 decision by the modern Turkish republic’s secular government ministers and argued that the building was the personal property of Ottoman Sultan Mehmet II, who conquered Istanbul in 1453.