This eerie underground mosque occupies the crypt of a former castle that was probably associated with the Castle of Galata. Tradition has it that the colossal chain used to blockade ships from entering the Golden Horn was anchored here. What remained of the ruins (the castle was destroyed during the Ottoman conquest) was converted into a mosque. The space is created by a low-ceilinged, vaulted maze supported by squat pillars. The columns are arranged in six rows of nine, forming little compartments for private prayer. Located in a side chapel are the tombs of two sainted Arab warriors killed in the first Arab siege. The location of these graves was revealed to a Naksibendi dervis in a dream in 1640. It wasn't until later, in 1757, that the cellar space was converted into a mosque. It is also known as the Kursunlu Mahzen Camii (Gunpowder Warehouse Mosque).