Built by the Byzantine Emperor Justinian in 537, Hagia Sophia was turned into a mosque with the 1453 Ottoman conquest of Istanbul. Mustafa Kemal Atatürk, the founding leader of the secular Turkish republic converted the structure into a museum in 1934.
Although an annex to the Hagia Sophia, the Sultan's pavilion, has been open to prayers since the 1990s, religious and nationalists group in Turkey have long yearned for the nearly 1,500-year-old edifice, which they regard as the legacy of Ottoman Sultan Mehmet the Conquerer, to be reverted into a mosque.
"This is Hagia Sophia breaking away from its captivity chains. It was the greatest dream of our youth," Erdoğan said last week. "It was the yearning of our people and it has been accomplished." Erdoğan also described its conversion into a museum by the republic's founding leaders as a mistake that is being rectified.