In 1985, during its time as a museum, Hagia Sophia was added to the UNESCO World Heritage List.
It served as a church for 916 years until the conquest of Istanbul, and a mosque from 1453 to 1934-nearly 500 years-and most recently as a museum for 86 years.
Erdoğan and other Turkish leaders had long advocated its restoration to a working mosque, open for worship.
On July 10, a Turkish court annulled a 1934 Cabinet decree that turned Hagia Sophia into a museum, paving the way for its use as a mosque.