Turkey on Thursday appointed appointed three imams for Hagia Sophia, one of them a professor of religious studies, as the nation prepares for the first Muslim prayers in the Istanbul landmark in 86 years following its conversion back into a mosque.

President Recep Tayyip Erdogan is scheduled to join hundreds of worshipers Friday for prayers inside the former Byzantine cathedral that became a mosque with the 1453 Muslim conquest of Istanbul and then a museum in 1934 after Turkey became a secular republic.

Erdogan issued a decree restoring the iconic sixth-century building as a mosque this month after a Turkish high court ruled that the Hagia Sophia had been illegally made into a museum more than eight decades ago. The move was met with dismay in Greece and the United States and from Christian church leaders.

On Thursday, the Turkish leader, joined by a large entourage, paid a surprise visit to inspect final preparations at the structure, including the unveiling of a sign at the entrance that reads: “The Hagia Sophia Grand Mosque.”

The head of Turkey’s religious authority, Ali Erbas, on Thursday announced the appointment of the three imams who will lead prayers at the reconverted mosque: Mehmet Boynukalin, a professor of Islamic law at Istanbul’s Marmara University, and Ferruh Mustuer and Bunjamin Topcuoglu, the imams of two other Istanbul mosques.

Erbas also named five muezzins — the officials who make the Muslim call for prayer — for Hagia Sophia, including two from Istanbul’s famed Blue Mosque.

READ: Hagia Sophia mosaics will be covered with curtains during prayers: Turkish presidential spokesman

Authorities have designated segregated areas outside of the Hagia Sophia for men and women wanting to join Friday's inaugural prayers.

Several roads leading to the building are being blocked. Authorities have said as many as 17,000 security personnel would be on duty.