The church of Saints Sergios and Bakchos is in the southeast side of Constantinople, not far away from the Sea of Marmara. The church belonged in the complex of the Palace of Hormisdas, the private residence of Justinian I, before he ascended to the throne. The new church was built by the emperor himself during the years 527-536 or 520-527 according to recent researches, next to the church of Saint Peter and Paul, which was previously constructed by Justinian. This way, the two churches had common narthex, atrium and propylon. Part of the masonry of the south wall of the church of Saints Sergios and Bakchos is considered to belong in the now-destroyed church of Saints Peter and Paul.
The new temple is octagonal, inscribed in a rectangle. Due to the similarity of its architectural plan to that of Hagia Sophia, it has been called Little Hagia Sophia (Küçük Ayasofya).
From George Kedrenos (12th century), we are informed that all around these two temples, a monks’ monastery was established in the years of Justinian. The last report referring to that monastery, dates back to 1427.
The church of Saints Sergios and Bakchos was transformed into a mosque in the years 1506-1512 by Hussein Agha, who was also buried next to the church. During the Balkan Wars (1912-1913) and the First World War (1914-1918), refugees seeked shelter in its courtyard.
These days, the church runs as a mosque with the name Küçük Ayasofya Camii.