The Hagia Sophia is a former Greek Orthodox patriarchal basilica (church), later an imperial mosque, and now a museum in Istanbul, Turkey. It was built in 537. Its name means "Wisdom of God".
Until 1453, it served as an Eastern Orthodox cathedral and seat of the Patriarchate of Constantinople. Between 1204 and 1261, it was converted to a Roman Catholic cathedral under the Latin Empire. The building was a mosque from 29 May 1453 until 1931. It was then secularized and opened as a museum on 1 February 1935.