The building was used as a church (Church of Asomaton or Archangelon) for over 1,200 years until the city fell to the Ottomans. In 1590 it was converted into a mosque, called the Mosque of Suleyman Hortaji Effendi, and a minaret was added to the structure. It was used as a mosque until 1912, when the Greeks captured the city during the Balkan War.