Hagia Sophia was the largest Christian church in the world when its current building was completed in Constantinople in AD 537.
Emperor Justinian I ordered the church after the earlier Hagia Sophia was destroyed during the Nika riots of 532. The architects Anthemius of Tralles and Isidore of Miletus created an enormous basilica crowned by a pioneering pendentive dome. Its scale and engineering made it the defining achievement of Byzantine architecture.
The church served as the cathedral of Constantinople and the seat of the Ecumenical Patriarch for centuries. It remained the world's largest church for more than 500 years, until the completion of the abbey church at Cluny in the 12th century. The building suffered earthquake damage, and its dome was rebuilt and raised after a collapse in 558.
A common mix-up is to confuse Hagia Sophia with St. Peter's Basilica. St. Peter's is larger by several modern measurements, but it was completed much later, in the Renaissance and Baroque periods. Hagia Sophia became a mosque after the Ottoman conquest in 1453, a museum in 1935, and a mosque again in 2020.