Hagia Sophia (from the Greek: Ἁγία Σοφία, "Holy Wisdom"; Latin: Sancta Sophia or Sancta Sapientia; Turkish: Ayasofya) is a former Greek Orthodox patriarchal basilica (church), later an imperial mosque, and now a museum (Ayasofya Müzesi) in Istanbul, Turkey. From the date of its construction in 537 until 1453, it served as an Eastern Orthodox cathedral and seat of the Patriarchate of Constantinople, except between 1204 and 1261, when 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.
The Church was dedicated to the Wisdom of God, the Logos, the second person of the Holy Trinity, its patronal feast taking place on 25 December, the commemoration of the Birth of the incarnation of the Logos in Christ. Although sometimes referred to as Sancta Sophia (as though it were named after Saint Sophia), sophia being the phonetic spelling in Latin of the Greek word for wisdom, its full name in Greek is Ναός τῆς Ἁγίας τοῦ Θεοῦ Σοφίας, "Shrine of the Holy Wisdom of God".
Famous in particular for its massive dome, it is considered the epitome of Byzantine architecture and is said to have "changed the history of architecture." It remained the World's largest cathedral for nearly a thousand years, until Seville Cathedral was completed in 1520. The current building was originally constructed as a church between 532 and 537 on the orders of the Byzantine Emperor Justinian and was the third Church of the Holy Wisdom to occupy the site, the previous two having both been destroyed by rioters. It was designed by the Greek scientists Isidore of Miletus, a physicist, and Anthemius of Tralles, a mathematician.