After the Ottoman conquest of Constantinople in 1453 by Mehmed II, the church was enclosed inside the walls of the Topkapi palace. The Janissaries used the church as an arsenal ("Cebehane") until 1826. It was also used as a warehouse for military equipment and repository for trophies of arms and military regalia taken by the Turks. During the reign of Sultan Ahmet III (1703–1730) it was converted into the National Military Museum in 1726.