History · Last reviewed 6 September 2026
The question of who built Hagia Sophia, and why, leads directly to one of the most ambitious architectural projects of the ancient world. The building that still dominates the historic peninsula of Istanbul was commissioned by the Byzantine emperor Justinian I and designed by two of the era’s most brilliant minds. Its construction between 532 and 537 was not merely a practical response to destruction; it was a deliberate statement of imperial power, religious devotion and cultural supremacy.
The emperor who commissioned it
Hagia Sophia was built on the orders of Emperor Justinian I, who ruled the Eastern Roman Empire from 527 to 565. Justinian is remembered as one of the most energetic and transformative rulers of late antiquity. He sought to restore the territorial extent of the Roman Empire, reform its laws and leave an indelible mark on its capital.
In January 532 the Nika Riots erupted in the city. What began as factional violence in the Hippodrome quickly escalated into a full-scale revolt against Justinian’s rule. Large parts of the city centre were burned, including the earlier church of Hagia Sophia that had stood on the same site. Once the revolt was brutally suppressed, Justinian faced both a ruined city centre and an opportunity. He decided to rebuild the church on a scale never before attempted.
The architects
Justinian entrusted the design to two men who were not traditional master-builders but leading scientists and geometricians of their day: Anthemius of Tralles and Isidore of Miletus.
Anthemius was a mathematician and physicist known for his work on geometry and reflective surfaces. Isidore was a professor of geometry and mechanics who had studied the works of Archimedes and Euclid. Their theoretical knowledge proved decisive. Instead of relying solely on inherited building traditions, they applied advanced mathematical principles to create a vast interior space crowned by a dome that appeared to float on light. The speed of construction — completed in just five years — was itself remarkable, and reflected both the architects’ skill and the enormous resources Justinian placed at their disposal.
Why was Hagia Sophia built?
Several interlocking motives drove the project.
First was the immediate need to replace the church destroyed in the Nika Riots. The site had already been sacred for nearly two centuries, and leaving it in ruins was politically and religiously unacceptable.
Second, Justinian intended the new Hagia Sophia to serve as the patriarchal cathedral of Constantinople and as the primary stage for imperial ceremony. Coronations, major liturgical celebrations and displays of imperial piety would take place beneath its dome, reinforcing the close alliance between emperor and Church.
Third, and perhaps most important, the building was conceived as a monument to Justinian’s own reign and to the restored glory of the Roman Empire. Contemporary sources record that on entering the finished church the emperor exclaimed that he had surpassed Solomon. The comparison was deliberate: by creating a temple greater than the legendary Temple of Jerusalem, Justinian positioned himself as a new and greater biblical king, a ruler whose Christian empire outshone all previous civilisations.
The architectural ambition matched the political message. The enormous dome, the play of light through dozens of windows, the rich marble revetments brought from across the Mediterranean and the vast unbroken interior space were all designed to overwhelm the senses and proclaim divine favour upon the emperor and his capital.
A building that defined an era
Hagia Sophia was consecrated on 27 December 537. From that day it became the largest and most celebrated church in Christendom, a status it retained for nearly a thousand years. Its design influenced later Byzantine architecture and, centuries afterward, Ottoman mosque design as well.
Hagia Sophia was built by Emperor Justinian I, designed by Anthemius of Tralles and Isidore of Miletus, and constructed between 532 and 537 in the aftermath of the Nika Riots. It rose not only to replace a destroyed church but to embody the power, piety and imperial vision of one of Byzantium’s greatest rulers. Nearly fifteen centuries later, the building still bears witness to that extraordinary ambition.

