The Ayasofya (Hagia Sophia) church, now used a museum, was built during the reign of Manuel Comnenos I, one of the kings of the Empire of Trabzon (1238-1263). Following Trabzon 's conquest by Sultan Mehmet, the Conqueror in 1461, the church was transformed into a mosque. For centuries, the Hagia Sophia church has attracted the attention of travellers and researchers visiting the city. Of these, Evliya Chelebi (1648), Pitton de Tournefort (1701), Hamilton (1836) Taxier (1864), Sakir Sevket of Trabzon (1878),and Lynch (1893) are well-known.
It is known that the mosque, which had been in a state of ruin, was restored in 1864 as a result of insistent attempts by Riza Efendi of Bursa . It was used as a depot and hospital respectively during the First World War but was redesigned as a mosque again after the war. It was reopened as a museum in 1964 after the joint restoration project carried out by the Directorate of Foundations and Edinburgh University between 1958 and 1962.
The building is a very good example of late Byzantine architecture. It has a cruciform plan with a high central dome. It has a vestibule called a narthex, and three aisles. The central aisle has a pentagonal abscissa and the adjacent aisles end with semi-circular abscissas. The building has three porches on the north, west and south sides. The dome has twelve corners and is supported by four marble monolithic columns, arches and pendants. There are vaults around the central dome and the roof has different heights and is covered with tiles. In addition to the elements reflecting the traditions of Christian art, the influence of Islamic Seljuk art can also be seen in the stone reliefs. The panels on the north and west porches are decorated with interlocking geometric designs and the ornate niches on the west side have the characteristics of Seljuk-period stone carving.
The most impressive side of the building is the south side. Here, on a frieze, the creation of Adam and Eve is depicted in relief. The 1st scene depicts the creation of Adam and Eve. The 2nd scene depicts the lives of Adam and Eve in the gardens of Eden . The 3rd scene depicts Adam and Eve pick the Forbidden Apple in the Eden . The 4th scene depicts their dismissal from the Garden, and the 5th scene depicts the first murder.
On the keystone of the arch is a single-headed eagle motif that is the symbol of the Comnenos dynasty that ruled Trabzon for 257 years. A similar eagle design is found on the exterior of the main east abscissa. On this fašade are the figures of mythical creatures such as griffons and centaurs, reliefs depicting doves, and panels decorated with stars and crescent designs in the centre, and medallions with floral designs. The floor below the main dome is covered with mosaic in opus-sectile technique made marbles of different colours. The frescoes, most of which depicting scenes from the Bible, are an important part of the decoration of the church.