From the Wikipedia I quote: The New Juma Mosque (Turkish: Yeni Cuma Camii) is a mosque in Trabzon, Turkey. It was built during Byzantine times as the Hagios Eugenios Church, dedicated to Saint Eugenius, the patron saint of the city. Following the capture of the city by Sultan Mehmed the Conqueror in 1461, like many churches in that city it was converted to a mosque.
It is not known exactly when the church was built, however researchers consider that it was a basilica. An inscription dated 1291 has been found near it. However, during the siege of Trebizond in 1222, Sultan Melik, enraged at the resistance of the city's inhabitants, is said to have ordered the upper walls torn down and the floors broken and pulled up, so it is likely the present structure was built in the years immediately afterwards.