The historic Hagia Sophia is in Istanbul, the Turkish city formerly known as Constantinople.
Emperor Justinian I commissioned the present building after an earlier church was destroyed during the Nika riots of 532. The new Hagia Sophia was completed in 537 under the direction of mathematician Anthemius of Tralles and physicist Isidore of Miletus. Its enormous dome and broad interior made it one of the most ambitious buildings of late antiquity.
For nearly a millennium, Hagia Sophia served as the principal cathedral of the Byzantine Empire and the seat of the patriarch of Constantinople. After the Ottoman conquest of Constantinople in 1453, it became a mosque. Ottoman architects added minarets and other features, while mosaics and Christian imagery were covered or altered over different periods.
The building became a museum in 1935 and was converted back into a mosque in 2020. Hagia Sophia is sometimes confused with the much later Blue Mosque, which stands nearby. Both are major Istanbul landmarks, but Hagia Sophia predates the Blue Mosque by more than a thousand years and was built as a Christian cathedral.