530-533: Sts. Sergios and Bakchos built by Justinian I and Theodora for the Monophysite community accomodated in the Hormisdas Palace
548: after Theodora´s death Justinian moved the Monophysites to the House of Urbicius, in Strategion's area, and the church perhaps served to the Orthodox monastery established in part of the Hormisdas Palace
551: Pope Vigilius sought a refuge in the church
second half of the 6th c.: the papal legates residing in the nearby Ta Plakidias palace complex in the sixth century were allowed to use the church
9th century: the monastery was one of the centres of the orthodox oposition to the official iconoclastic policy of the empire
after 869: church reconstructed by Basil I, perhaps after the earthquake of 869
10th - 15th c.: church mentioned rarely but it probably housed some relics and the monastery was still functioning in the fifteenth century
16th c.: church was converted into a mosque by Küçük Hüseyin ağa b. Abdülhay (died around 1510) in the reign of the Sultan Beyazit II (new decoration of the interior, new furnishing and the west porch)
1740: restoration of the mosque (known as Küçük Ayasofya Camii) by the Great Vesir Haci Ahmet Paşa; the minaret on the south-west corner built in 1760´s
1870: construction of the railroad immediately south of the church; since then more and more frequently passing trains have shaked the church and endangered its stability
1940: minaret almost completely demolished
1956: erection of a new minaret
1999: strong earthquake caused damages to the structure of the mosque (visible cracks in the vaulting)
2001: mosque appeared on ICOMOS´ Heritage at Risk list
2004 - 2006: major reconstruction of the building