On December 27, 537, the Hagia Sophia was inaugurated by the Emperor Justinian I as an Eastern Orthodox Cathedral. From the article:
"December 27th, 537 - Agia Sofia Is Inaugurated. - Greek City Times
Built on the initiative of Emperor Justinian; it is one of the great structures and landmarks of Christendom, serving as a Greek Orthodox cathedral. It was also the seat of the Ecumenical Patriarch of Constantinople until 1453.
The church of Hagia Sophia (literally “Holy Wisdom”) in Constantinople, now Istanbul, was first dedicated in 360 by Emperor Constantius, son of the city’s founder, Emperor Constantine. Hagia Sophia served as the cathedra, or bishop’s seat, of the city. Originally called Megale Eklesia (Great Church), the name Hagia Sophia came into use around 430. The first church structure was destroyed during riots in 404; the second church, built and dedicated in 415 by Emperor Theodosius II, burned down during the Nika revolt of 532, which caused vast destruction and death throughout the city.
Immediately after the riots, Emperor Justinian I (r. 527–65) ordered the church rebuilt. The new building was inaugurated on December 27, 537. Architects Anthemios of Tralles and Isidoros of Miletos most likely were influenced by the mathematical theories of Archimedes (ca. 287–212 B.C.).
The vast, airy naos, or central basilica, with its technically complex system of vaults and semi-domes, culminates in a high central dome with a diameter of over 101 feet (31 meters) and a height of 160 feet (48.5 meters). This central dome was often interpreted by contemporary commentators as the dome of heaven itself. Its weight is carried by four great arches, which rest on a series of tympana and semi-domes, which in turn rest on smaller semi-domes and arcades. This complicated structural system was prone to problems: the first dome collapsed in 558, to be rebuilt in 562 to a greater height. Earthquakes and earth subsidence have also taken their toll on the building over the centuries, although the surviving main structure is essentially that which was first built between 532 and 537.
The interior of Hagia Sophia was paneled with costly colored marbles and ornamental stone inlays. Decorative marble columns were taken from ancient buildings and reused to support the interior arcades. Initially, the upper part of the building was minimally decorated in gold with a huge cross in a medallion at the summit of the dome. After the period of Iconoclasm (726–843), new figural mosaics were added, some of which have survived to the present day.
After Mehmet II’s conquest of the city in 1453, Hagia Sophia was converted to a mosque (Ayasofya Camii), which it remained until the fall of the Ottoman empire in the early twentieth century. A view of Hagia Sophia during the conquest is conveyed in a woodcut by Pieter Coecke van Aelst, depicting the procession of Süleyman the Magnificent through the Hippodrome. During this period, minarets were built around the perimeter of the building complex, Christian mosaic icons were covered with whitewash, and exterior buttresses were added for structural support. In 1934, the Turkish government secularized the building, converting it into a museum, and the original mosaics were restored.
On July 10 of this year, the Turkish Council of State, at the request of an Islamic association that had appealed against the 1934 decision, revoked the decree that had transformed Hagia Sophia into a museum. In support of the request, President Recep Tayyip Erdoğan signed a decree to convert the museum into a mosque. He said it was “a grave mistake” that the place was no longer used for worship. This opened a new chapter in the history of the ancient basilica.
The first prayer session of the Muslim community took place on Friday, July 24. For the occasion, the mosaics of the Christian era were covered with black cloth or darkened with tricks of light and shadow. The prayer was led by the imam, who climbed the steps of the minbar and delivered the Friday sermon, holding an Ottoman sword with his left hand, which seemed to be that of Muhammad II. He explained that this “is a tradition” of mosques and that it is a symbol of conquest. Holding it in the left hand, and not in the right, excludes – according to a traditional meaning – a declaration of war against non-believers.
President Erdoğan attended the ceremony. He first visited the tomb of Muhammad II, “the Conqueror,” and then he himself started the prayer – a unique event that does not normally happen in any Muslim country – by reading a sura from the Koran called “of victory” or “of conquest.”
In fact, the date of July 24 was not chosen by chance. It is the anniversary of the Treaty of Lausanne of July 24, 1923, in which the Turkish borders were revised with respect to the previous Treaty of Sèvres (of 1920, after the end of the First World War), and those of Greece and Bulgaria. Turkey was required to renounce all claims on Cyprus, Syria and Iraq. The political significance of the date is clear: Erdoğan intends to reaffirm the power of his country and reshape the borders of present-day Turkey. On August 20, the Turkish president signed another decree that transformed the church-museum of the Holy Saviour in Chora into a mosque. The monument dates back to the 5th century and is a real jewel for the Byzantine mosaics and frescoes that can be admired there, including that of the famous Madonna, the Virgin of Tenderness. It was transformed into a mosque in 1511 and then into a museum by Atatürk in 1934."