Why was the Hagia Sophia Built?
The present Hagia Sophia was originally constructed as a basilica between A.D. 532 and 537 under the orders of the Byzantine Emperor Justinian, and was, in fact, the third church of Holy Wisdom to occupy the site. Two cathedrals before had been destroyed in riots and natural disasters, however, some marble blocks from the second church remains in the gardens.