
Hagia Sophia was built in Trebizond during the reign of Manuel I between 1238 and 1263. The oldest graffiti carved in the apses of the church contain the dates 1291 and 1293. After Mehmed II conquered the city in 1461, the church was possibly converted into a mosque and its frescos covered in whitewash. Other scholars suggest it was not converted until 1584, being spared the initial transformation because it stood several kilometres outside the city walls. The adjacent monastery continued to be used by monks as late as 1701, when Tournefort found them still in residence. It is likely that the monks gradually abandoned a building that failed to protect them from harassment and predation, and the Turks assumed its use without needing to expel them.