On May 7, 558, in Constantinople, the dome of the Hagia Sophia collapsed. Justinian I immediately ordered the dome rebuilt. From the article:
"History of Hagia Sophia - Christian Period - Beneath The Hagia Sophia
First Hagia Sophia
The first Hagia Sophia was known as the Megálē Ekklēsíā, mean Great Church. It was open to service on 15 February 360 by the Arian bishop Eudoxius of Antioch (during the reign of Constantius II). It was built next to the area where the imperial palace was being developed. The Hagia Sophia nearby Hagia Eirene (“Holy Peace”) church which one was completed earlier and served as cathedral until the Hagia Sophia was completed. Both churches Hagia Sophia and Hagia Eirene acted together as the principal churches of the Byzantine Empire.
The first Hagia Sophia was built as a traditional Latin colonnaded basilica with galleries and a wooden roof. First church was claimed to be one of the world’s most outstanding monuments at the time.
Because of riots, this first church was largely burned down. Nothing remains of the first Hagia Sophia today.
Second Hagia Sophia
A second Hagia Sophia was ordered by Theodosius II, who inaugurated it on 10 October 415. The basilica got a wooden roof was built by architect Rufinus. A fire started during the tumult of the Nika Revolt (when the Justinian 1 ruler) and burned the second Hagia Sophia to the ground on 13–14 January 532
Several marble blocks from the second church survive to the present on the garden of Hagia Sophia; among them are reliefs depicting 12 lambs representing the 12 apostles. It was part of a monumental front entrance, they now reside in an excavation pit adjacent to the museum’s entrance.
Third Hagia Sophia (current structure)
On 23 February 532 was a turning point on the history. Only a few days after the destruction of the second Hagia Sophia, Emperor Justinian I (Flavius Petrus Sabbatius Iustinianus ) elected to build a third and entirely different basilica, larger and more majestic than its predecessors.
For last Hagia Sophia, Justinian chose physicist Isidore of Miletus and mathematician Anthemius of Tralles as architects; but Anthemius died within the first year of the big endeavor.
The emperor had material brought from all over the Byzantium empire – such as large stones from quarries in porphyry from Egypt, Hellenistic columns from the Temple of Artemis (Ephesus – Turkey), green marble from Thessaly (Greece), black stone from the Boshporus region ( Turkey) , and yellow stone from Syria.
More than ten thousand people were employed for new Hagia Sophia. This big and unique church was contemporaneously recognized as a major work of architecture.
The emperor Justinian 1, together with the patriarch Eutychius, inaugurated the new basilica on 27 December 537. Rumors said that, when he entered the church for the first time he exclaimed “I have beaten you Solomon”, implying that the new edifice was better than the Temple built by Solomon.
Hagia Sophia was the mosaics inside the church were, but weren’t complete entirely. However, mosaics completed under the reign of Emperor Justin II (565–578).
Hagia Sophia was the seat of the Orthodox patriarch of Constantinople. It also used principal setting for Byzantine imperial ceremonies, such as coronations.
Two earthquakes (August 553 and December 557) caused cracks in the main dome and eastern half-dome. The main dome of Hagia Sophia collapsed completely during a subsequent earthquake (7 May 558), destroying the ambon, altar, and ciborium.
Deformation of the piers which sustained the dome. The emperor Justinian 1 ordered an immediate restoration for Hagia Sophia. He entrusted it for restoration to the Isidorus the Younger, nephew of Isidore of Miletus. Isidorus the Younger used lighter materials and elevated the Hagia Sophia’s dome by “30 feet”giving the building its current interior height of 55.6 metres (182 ft). This reconstruction, giving the Hagia Sophia its present 6th-century form, was completed in 562.
Emperor Leo the Isaurian (in 726) issued a series of edicts against the veneration of images, ordering the army to destroy all icons. All religious pictures and statues were removed from the chuch (Byzantine iconoclasm).
After a brief reprieve under Empress Irene (797–802), in 787, the iconoclasts made a comeback.
Emperor Theophilus (829–842) was strongly influenced by Islamic art. For this reason he forbids graven images. He had a two-winged bronze door with his monograms installed at the southern entrance of the Hagia Sophia.
The basilica suffered damage, with a great fire in 859. The earthquake on 8 January 869, that made a half-dome collapse. Hagia Sophia needed a new restoration and Emperor Basil I ordered the church repaired.
Great earthquake of 25 October 989 gave big damage to Hagia Sophia and collapsed the Western dome arch. Emperor Basil II asked for the Armenian architect Trdat to direct the repairs. Architect Trdat erected and reinforced the fallen dome arch, and rebuilt the west side of the dome with 15 dome ribs. After the six years Hagia Sophia was re-opened on 13 May 994.
It was not only a architectural reconstruction, also Hagia Sophia’s decorations were renovated, including the additions of paintings of four immense cherubs, a new depiction of Christ on the dome, and on the apse a new depiction of the Virgin Mary holding Jesus between the apostles Peter and Paul. On the great side arches of Hagia Sophia were painted the prophets and the teachers of the church.
Upon the capture of Constantinople during the Fourth Crusade, Hagia Sophia was ransacked and desecrated by the Latin Christians. Capture of Constantinople described by the Byzantine historian Niketas Choniates; many reputed relics from the Hagia Sophia ( such as a stone from the tomb of Jesus, the Virgin Mary’s milk, the shroud of Jesus, and bones of several saints ) were sent to churches in the Europa and can be seen there now in various museums. During the 1204–1261 period, Hagia Sophia became a Roman Catholic cathedral.
In 1261, after the recapture city by the Byzantines, the Hagia Sophia was in a dilapidated state. In 1317, emperor Andronicus II ordered four new buttresses to be built in the eastern and northern parts of the Hagia Sophia. This reconstruntion financing with the inheritance of Andronicus II’s deceased wife, Irene.
The earthquake (October 1344) created new cracks in the dome of Hagia Sophia. After then, several parts of the building collapsed on 19 May 1346; consequently, the church was closed until 1354. This year Hagia Sophia was opened again when repairs were undertaken by architects Astras and Peralta."