Turkish President Recep Tayyip Erdogan will take part Friday in the first prayers at Hagia Sophia since the Istanbul landmark was reconverted to a mosque despite international condemnation.
A top Turkish court revoked the sixth-century monument's status as a museum on July 10 and Erdogan then ordered the building to reopen for Muslim worship, deeply angering the Christian community and further straining relations with NATO ally Greece.
The UNESCO World Heritage site in historic Istanbul was first built as a cathedral in the Christian Byzantine Empire but was converted into a mosque after the Ottoman conquest of Constantinople in 1453.
Some 3.8 million tourists visited the museum last year.
The Council of State, the highest administrative court, unanimously cancelled a 1934 decision by Turkey's modern founder Mustafa Kemal Ataturk to turn it into a museum, saying it was registered as a mosque in its property deeds.
The head of Turkey's religious affairs directorate, Ali Erbas, said on Wednesday that up to 1,000 people could take part in the Friday prayer, which will be preceded by a Koran recital.
Leaders and officials from several Muslim-majority countries were invited, including Qatar and Azerbaijan, Turkish media reported.
Nearly 20,000 security forces will be in the area to ensure the first prayer takes place without incident.
The concern now for historians is over the preservation of Hagia Sophia.
Architects and builders have been working night and day to meet the Friday deadline, with scaffolding visible inside the monument and turquoise carpet laid for the faithful to pray.
Some experts are concerned about the speed of the conversion.
"(Two weeks) does not allow enough time to adequately consult with experts, deliberate, discuss and... come up with a sustainable strategy to preserve Hagia Sophia for future generations," Tugba Tanyeri Erdemir, of the University of Pittsburgh, told AFP.
"Steps taken in haste... can cause irreversible damage to this World Heritage site and its spectacular art," Erdemir added.
Erdogan's spokesman Ibrahim Kalin vowed last Sunday that the authorities would "avoid harming the frescoes, icons and the historic architecture of the edifice".
The Byzantine mosaics, plastered over for centuries when the building served as a mosque in the Ottoman Empire, will be hidden with curtains during prayer times since Islam bans figurative representations.
"Not a single nail will be hammered," Erbas promised.
Erdogan's decision has undone part of the secular legacy of Ataturk, who wanted Hagia Sophia as a museum so as to "offer it to humanity".
The timing of the first prayer is significant. Friday will be the 97th anniversary of the Treaty of Lausanne, which set modern Turkey's borders after years of conflict with Greece and Western powers.
Erdogan has called for the treaty's revision in recent years.
Greek Foreign Minister Nikos Dendias said Wednesday that the Hagia Sophia conversion was "not a Greek-Turkish dispute" and Athens would "highlight the issue through international initiatives".