It is believed that this structure, the tablet of which is not currently available, was built between the 4th and 8th century. According to the generally-approved propositions in the sources, the phases of construction of the building are assessed as three phases. Phase 1: 5th-6th Century; Phase 2: Modifications after the fire that broke out in 1065; Phase 3: Ottoman Era after 1331.

The building has an important place in the history of Christianity because it was the place of gathering for the 7th Council (24 September 787). The structure has a rectangular shape in the East & West direction with three naves. There is also a chapel next to the structure in the southeastern part. The building was probably built upon a structure that previously existed there during the Period of Roman Empire.

Fresco traces are observed inside the window arches of the pastophorium cells of the building (the closed spaces in the north and south of the Absis), between the arches, on the pendentives and on the walls. In addition to the geometrical tile explored in the excavation conducted in the Absis section, a tile in the Opus Sectile technique was also found during the cleaning work inside the building in 1955.

Certain repairs and additions were made in the structure after the earthquake that occurred in 1065. Upon the domination of the Ottomans in 1331, the structure was converted to a mosque by Orhan Gazi. While our knowledge is very limited about the condition of the structure in the 15th and 16th Centuries, it is known that Sinan the Architect repaired the structure and made certain amendments on the structure following a fire that broke out in the 17th century. It is thought that the minaret and mihrab of the mosque was added by Sinan the Architect as a result of the restoration conducted during this period. Along with the addition of mihrab during the Turkish Period, a modification was made on that part of the wall, and round windows were added on the two sides of the mihrab, and the door between the south side nave and chapel was closed. Also, the Narthex was converted into late comers place covered by single-slope roof. It has been emphasized in the sources since the 18th Century that the structure is uncared and ruined.

Tiles and plaster were used particularly around the mihrab in the structure that was covered by hand-drawn decoration during the period of the Ottoman Empire. It is still possible to observe the traces of tiles on the mihrab and bema wall. There are traces of hand-drawn vegetal figures and strips on the bema arch and walls and apparent inscriptions inside those strips. It is possible to observe human faces, geometrical and linear arrangements with a great number of ship depictions on the graffiti decorations on the western wall and minaret of the structure. It is indicated in the sources based on the ship depictions that it might have been built in the 16th and 17th century. As a result of the environmental arrangements and expropriation conducted in 1980s, the structures around the Hagia Sophia were demolished and the area was landscaped with green plants. In December 2007, a restoration work was initiated by the Regional Directorate of Foundations. A certain part of the structure was started to be used as a mosque in the Morning Prayer on the first day of the Feast of Sacrifice on November 6th, 2011.