A Turkish court has paved the way for the government to convert the Hagia Sophia museum, one of Istanbul's most famous landmarks, into a mosque.

The Hagia Sofia, a major draw for tourists, has a long and complicated history. The architectural marvel was built as a church by the Byzantines in the 6th century, and was converted into a mosque in 1453 under Ottoman rule.

In 1934, Turkish leader Mustafa Kemal Ataturk's cabinet decreed that it be turned into a museum. It is widely regarded as a symbol of peaceful religious coexistence.

Friday's ruling by a top Turkish court invalidates the 1934 decree. It grants Turkey's president the authority to restore the museum to its status as a working mosque.

President Recep Tayyip Erdogan has previously signaled that he wants to make that change. He is expected to speak later Friday about the status of the Hagia Sophia.

In recent years, the Turkish government has "allowed Quran readings there on special occasions," Turkey's Anadolu news agency reported.

Previously, a presidential spokesman offered assurances that the building would remain open to visitors and that no changes would be made to the interior. The domed site retains its Christian iconography, and minarets were added during its time as a mosque.

The possible change to the museum's status has been widely condemned internationally.

"As museum, Hagia Sophia can function as place and symbol of encounter, dialogue and peaceful coexistence of peoples and cultures, mutual understanding and solidarity between Christianity and Islam," wrote Ecumenical Patriarch Bartholomew, spiritual leader of Orthodox Christians.

He warned that the museum is a place where "East is embraced with the West" – and if converted, it would "fracture these two worlds."

U.S. Secretary of State Mike Pompeo said this month that converting the Hagia Sophia would limit "its unsurpassed ability — so rare in the modern world — to serve humanity as a much-needed bridge between those of differing faith traditions and cultures."

On Friday, the plaza in front of the Hagia Sophia, normally packed with visitors standing in long lines to get in, was nearly empty, after officials warned against large public gatherings that could spread the coronavirus. Visitors strolled in and out of the building without waiting.

A 32-year-old man named Sahib held his prayer mat and said he made the trip to the Hagia Sophia in hopes of performing Friday midday Muslim prayers there. Speaking before the decision was announced, he said, "I am hoping the Council of State reverses this wrong decision, so we can do our prayers in the Hagia Sophia." He said he'd be back next Friday to pray.

Elena, a Russian on her first visit to Istanbul, said she doesn't favor converting the museum back into a working mosque. "Well, even being Muslim myself," she said, "I think it still has to stay as a museum."

She said visiting the Hagia Sophia was an unexpectedly thrilling part of her visit.

"As I was about to enter, I didn't expect that I would feel so excited," she said. "It was really breathtaking."

Copyright 2020 NPR. To see more, visit https://www.npr.org.