[27] According to Ken Dark and Jan Kostenec, a further remnant of the 4th century basilica may exist in a wall of alternating brick and stone banded masonry immediately to the west of the Justinianic church.
[33] 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).
[48] 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.
[63] 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.
[66] 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.
[72][73][74] 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'.
[79] 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", while "all the dwellings adjacent to Hagia Sophia and adjoining the Augusteion were demolished by [Maria's] men".
[79] A battle ensued in the Augustaion and around the Milion, during which the defenders fought from the "gallery of the Catechumeneia (also called the Makron)" facing the Augusteion, from which they eventually retreated and took up positions in the exonarthex of Hagia Sophia itself.
[79] 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".
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).
[69][89] 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.
[94] The text is self-attributed to Nicephorus, a priest of Hagia Sophia, and contains a description of the end time in the form of a dialogue, in which the interlocutor, upon being told by the saint that Constantinople will be sunk in a flood and that "the waters as they gush forth will irresistibly deluge her and cover her and surrender her to the terrifying and immense sea of the abyss", says "some people say that the Great Church of God will not be submerged with the city but will be suspended in the air by an invisible power".
They closed the gates and stood there, hoping for salvation.In accordance with the traditional custom of the time, Sultan Mehmed II allowed three full days of unbridled pillage in the city shortly after it was captured.
[97] 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.
[107] As described by Western visitors before 1453, such as the Córdoban nobleman Pero Tafur[108] and the Florentine geographer Cristoforo Buondelmonti,[109] the church was in a dilapidated state, with several of its doors fallen from their hinges.
During Suleiman's reign, the mosaics above the narthex and imperial gates depicting Jesus, Mary, and various Byzantine emperors were covered by whitewash and plaster, which were removed in 1930 under the Turkish Republic.
[113][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.
[128][129] 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.
[128][129][137] On 13 May 2017, a large group of people, organized by the Anatolia Youth Association, gathered in front of Hagia Sophia and prayed the morning prayer with a call for the re-conversion of the museum into a mosque.
[138] 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.
[135] 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".
[167][168] 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".
[140] 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".
[179] 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.
[196] Armenia's Foreign Ministry expressed "deep concern" about the move, adding that it brought to a close Hagia Sophia's symbolism of "cooperation and unity of humankind instead of clash of civilizations.
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.