Hagia Sophia underwent two phases of construction before attaining its present state. Although very little is known about this church, it is assumed that it was a basilica-type structure with a rectangular floor plan, circular apse and timbered roof. It was similar to St. Studios, a basilica in Istanbul , the ruins of which still exist.
Ancient sources emphasize that the eastern wall was circular.
The historian Socrates indicated that the church was named Sophia during the reign of Emperor Constantius. The name given to the church symbolized the second divine attribute of the Holy Trinity. Both names, Megale Ekklesia and Hagia Sophia are used today. T he original church was destroyed in 404 AD by mobs, during the riots, when Emperor Arcadius sent the Patriarch of Constantinople, John Chrysostom, into exile for his open criticism of the Empress. The architect of this second church was Ruffinos.