Not long after the Conquest, Mehmet the Conqueror visited this 13th-century church to discuss theological questions with the Patriarch of the Orthodox Church. They talked in the southern side chapel known as the parecclesion, which is decorated with gold mosaics. This part of the building, which functions as a museum and is overseen by Aya Sofya, was closed for restoration at the time of research for an indefinite period.
The church was endowed by a nephew of Emperor Michael VIII Palaeologos and built between 1292 and 1294. The chapel was endowed by the benefactor's wife (the inscription around Christ's head at the base of the half dome reads 'The nun Maria gave the promise of salvation in the name of her husband, the victorious and deserving protostrator Michael Glabas Ducas') and dates from 1315. It was the seat of the Christian Orthodox Patriarchate from 1455 to 1587, after which time it was converted into a mosque and named Fethiye (Conquest) to commemorate Sultan Murat III's victories in Georgia and Azerbaijan. Part of the building still functions as a mosque, while this part is a deconsecrated museum.
In the paracclesion, the most impressive of the mosaics are the Pantokrator and 12 Prophets adorning the dome, and the Deesis (Christ with the Virgin and St John the Baptist) in the apse.