Muslim prayers have been held in the iconic Hagia Sophia for the first time in 86 years after the reconversion of the Istanbul landmark into a mosque earlier this month.
The Friday prayers took place two weeks after Turkish President Recep Tayyip Erdogan controversially declared the nearly 1,500-year-old monument open to Muslim worship after a top court ruled the building's conversion to a museum by modern Turkey's founding statesman in the mid-1930s was illegal.
Erdogan, accompanied by cabinet minister and other top officials, joined hundreds of worshippers inside Hagia Sophia as large crowds gathered outside.
The UNESCO World Heritage Site was built as a cathedral during the reign of Byzantine emperor Justinian I in 537 but converted into a mosque after the Ottoman conquest of Constantinople in 1453.
It was designated a museum in a key reform of the post-Ottoman authorities under the modern republic's founder Mustafa Kemal Ataturk.
Erdogan said last year it had been a "very big mistake" to convert it into a museum.
Critics however accuse Erdogan, who has been in power for 17 years, of playing to his nationalistic base, with support eroding amid a global economic downtown caused by the coronavirus pandemic.
Towering over Istanbul's skyline, its breathtaking domes seemingly afloat, it is also one of Turkey's most popular tourist attractions, with 3.7 million visitors in 2019.
Al Jazeera's Sinem Koseoglu, reporting from Istanbul, said Friday was "a very big day" in the city of some 18 million.
"The heart of the city, the historical peninsula, is under total lockdown since last night," she said.
In the sprawling square outside Hagia Sophia, authorities set up separate areas for men and women to worship on Friday, while more than 700 health personnel, 101 ambulances and a helicopter ambulance were available.
Istanbul Governor Ali Yerlikaya asked that people to bring four items - "masks, prayer mats, patience and understanding".
Turkey pledged to keep Hagia Sophia, whose floor has been covered with a turqoise carpet, open to tourists and welcome those of all faiths. Entry will now be free, while intricate mosaics of the Virgin Mary, baby Jesus and other Christian symbols will be veiled by curtains at prayer time.
Recitation of the holy Quran will go on for the next 24 hours and the revered landmark will stay open overnight, according to state media reports.
All five prayers will henceforth also be held daily at the mosque.
"We are ending our 86 years of longing today," said one man, Sait Colak, referring to the nearly nine decades since Hagia Sophia was declared a museum and ceased to be a place of worship.
"Thanks to our president and the court decision, today we are going to have our Friday prayers in Hagia Sophia."
Aynur Saatci, another worshipper, said she was on holidays in the eastern city of Erzurum but decided to cut her holiday short in order to attend the service.
"I immediately cut my holidays short and returned to Istanbul as soon as I knew we could pray in Hagia Sophia," Saatci said. "I'm deeply moved."
The United States, the European Union, Russia and various church leaders expressed concern at the change in status, while neighbouring Greece branded the move an "open provocation to the civilised world".
The UN's cultural agency, UNESCO, said it deeply regretted Turkey's decision, which was "taken without prior dialogue".
Erdogan insisted, however, it was Turkey's "historical and sovereign right".
Koseoglu said Erdogan was expected to deliver a short speech after the prayer.
"This is a very historical moment for Turkey, especially the conservatives pro-Islamist electorate who have [long wanted] to pray inside."