[34] Fragments of a frieze of reliefs with 12 lambs representing the 12 apostles also remain; unlike Justinian's 6th-century church, the Theodosian Hagia Sophia had both colourful floor mosaics and external decorative sculpture.
John the Lydian describes the church as the "temenos of the Great God" (Greek: τὸ τοῦ μεγάλου θεοῦ Τέμενος, romanized: tò toû megálou theoû Témenos).
[49] The white marble cladding of much of the church, together with gilding of some parts, would have given Hagia Sophia a shimmering appearance quite different from the brick- and plaster-work of the modern period, and would have significantly increased its visibility from the sea.
[62][63] According to the history of the patriarch Nicephorus I and the chronicler Theophanes the Confessor, various liturgical vessels of the cathedral were melted down on the order of the emperor Heraclius (r. 610–641) after the capture of Alexandria and Roman Egypt by the Sasanian Empire during the Byzantine–Sasanian War of 602–628.
[64] The Avars attacked the extramural areas of Constantinople in 623, causing the Byzantines to move the "garment" relic (Ancient Greek: ἐσθής, romanized: esthḗs) of Mary, mother of Jesus to Hagia Sophia from its usual shrine of the Church of the Theotokos at Blachernae just outside the Theodosian Walls.
[65] On 14 May 626, the Scholae Palatinae, an elite body of soldiers, protested in Hagia Sophia against a planned increase in bread prices, after a stoppage of the Cura Annonae rations resulting from the loss of the grain supply from Egypt.
[67] A homily, attributed by existing manuscripts to Theodore Syncellus and possibly delivered on the anniversary of the event, describes the translation of the Virgin's garment and its ceremonial re-translation to Blachernae by the patriarch Sergius I after the threat had passed.
[73][74][75] She was probably baptized in Hagia Sophia's baptistery, taking the name of the reigning augusta, Helena Lecapena, and receiving the titles zōstē patrikía and the styles of archontissa and hegemon of the Rus'.
[85] According to Niketas Choniates, they "transformed the sacred courtyard into a military camp", garrisoned the entrances to the complex with locals and mercenaries, and despite the strong opposition of the patriarch, made the "house of prayer into a den of thieves or a well-fortified and precipitous stronghold, impregnable to assault", while "all the dwellings adjacent to Hagia Sophia and adjoining the Augusteion were demolished by [Maria's] men".
[85] At this point, "the patriarch was anxious lest the enemy troops enter the temple, with unholy feet trample the holy floor, and with hands defiled and dripping with blood still warm plunder the all-holy dedicatory offerings".
According to his account, composed at the court of the rump Empire of Nicaea, Hagia Sophia was stripped of its remaining metal ornaments, its altar was smashed into pieces, and a "woman laden with sins" sang and danced on the synthronon.
[88][89][90] He adds that mules and donkeys were brought into the cathedral's sanctuary to carry away the gilded silver plating of the bema, the ambo, and the doors and other furnishings, and that one of them slipped on the marble floor and was accidentally disembowelled, further contaminating the place.
In 1317, emperor Andronicus II Palaeologus (r. 1282–1328) ordered four new buttresses (Medieval Greek: Πυραμίδας, romanized: Pyramídas) to be built in the eastern and northern parts of the church, financing them with the inheritance of his late wife, Irene of Montferrat (d.1314).
[70][94] On 12 December 1452, Isidore of Kiev proclaimed in Hagia Sophia the long-anticipated ecclesiastical union between the western Catholic and eastern Orthodox Churches as decided at the Council of Florence and decreed by the papal bull Laetentur Caeli, though it would be short-lived.
According to the Greek historian Doukas, the Hagia Sophia was tainted by these Catholic associations, and the anti-union Orthodox faithful avoided the cathedral, considering it to be a haunt of demons and a "Hellenic" temple of Roman paganism.
[97] The author relates that the fall of the city to "Mohammadenism" was foretold in an omen seen by Constantine the Great – an eagle fighting with a snake – which also signified that "in the end Christianity will overpower Mohammedanism, will receive the Seven Hills, and will be enthroned in it".
[101] Despite the ill-repute and empty state of Hagia Sophia after December 1452, Doukas writes that after the Theodosian Walls were breached, the Byzantines took refuge there as the Turks advanced through the city: "All the women and men, monks, and nuns ran to the Great Church.
They closed the gates and stood there, hoping for salvation.In accordance with the traditional custom of the time, Sultan Mehmed II allowed his troops and his entourage three full days of unbridled pillage and looting in the city shortly after it was captured.
[103] Shortly after the defence of the Walls of Constantinople collapsed and the victorious Ottoman troops entered the city, the pillagers and looters made their way to the Hagia Sophia and battered down its doors before storming inside.
[119][better source needed] During the reign of Selim II (r. 1566–1574), the building started showing signs of fatigue and was extensively strengthened with the addition of structural supports to its exterior by Ottoman architect Mimar Sinan, who was also an earthquake engineer.
[134][135] From the early 2010s, several campaigns and government high officials, notably Turkey's deputy prime minister Bülent Arınç in November 2013, demanded the Hagia Sophia be converted back into a mosque.
[134][135][143] On 13 May 2017, a large group of people, organized by the Anatolia Youth Association (AGD), gathered in front of Hagia Sophia and prayed the morning prayer with a call for the re-conversion of the museum into a mosque.
[144] On 21 June 2017 the Directorate of Religious Affairs (Diyanet) organized a special programme, broadcast live by state-run television TRT, which included the recitation of the Quran and prayers in Hagia Sophia, to mark the Laylat al-Qadr.
[141] On 25 June, John Haldon, president of the International Association of Byzantine Studies, wrote an open letter to Erdoğan asking that he "consider the value of keeping the Aya Sofya as a museum".
[178][179] Following the Turkish government's decision, UNESCO announced it "deeply regret[ted]" the conversion "made without prior discussion", and asked Turkey to "open a dialogue without delay", stating that the lack of negotiation was "regrettable".
[146] Greek culture minister Lina Mendoni called it an "open provocation to the civilised world" which "absolutely confirms that there is no independent justice" in Erdoğan's Turkey, and that his Turkish nationalism "takes his country back six centuries".
[190] The former deputy prime minister of Italy, Matteo Salvini, held a demonstration in protest outside the Turkish consulate in Milan, calling for all plans for accession of Turkey to the European Union to be terminated "once and for all".
Presidential spokesman İbrahim Kalın said that the icons and mosaics of the building would be preserved, and that "in regards to the arguments of secularism, religious tolerance and coexistence, there are more than four hundred churches and synagogues open in Turkey today.
With the use of ground-penetrating radar (GPR), teams discovered weak zones within the Hagia Sophia's gallery and also concluded that the curvature of the vault dome has been shifted out of proportion, compared to its original angular orientation.
This shows that the Romans had prior knowledge of flying buttresses, which can also be seen at in Greece, at the Rotunda of Galerius in Thessaloniki, at the monastery of Hosios Loukas in Boeotia, and in Italy at the octagonal basilica of San Vitale in Ravenna.