Hagia Sophia is a museum, formerly Greek Orthodox church which was converted into a mosque in 1584, and located in Trabzon, in the north-eastern part of Turkey. It dates back to the thirteenth century when Trabzon was the capital of the Empire of Trebizond. It is located near the seashore and two miles west of the medieval town's limits. It is one of a few dozen Byzantine sites still extant in the area. It has been described as being "regarded as one of the finest examples of Byzantine architecture."HistoryHagia 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 kilometers outside the city walls. The monastery next door 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.During World War I and for a brief period afterward, the city was occupied by the Russian military and used as a makeshift hospital and depot. Afterwards it was put back into use as a mosque, until 1964 when it was turned into a museum - which it remains to this day. Between 1958 and 1964 the surviving frescoes were uncovered and the church consolidated with the help of experts from Edinburgh University and the General Directorate of Foundations; one expert involved in the work estimated no more than one-sixth of the original decorations had survived. All that did survive, however, are thought to be original works done just after its construction, and are considered part of the Byzantine 'Palaiologic Renaissance'.