It served as the major redoubt of the city's acropolis, as well as the seat of its garrison commander in Ottoman times, until the late 19th century.
There is no reference to this fort in the older literary sources, and the later ones are often ambiguous: a kastéllion (καστέλλιον, "fortress") is mentioned in 1208–1209 and a "kastellion with the Tzakones of the castle" in 1235.
The "Koulas of Thessaloniki" (κουλάς from Turkish: kule, "fort") is present in the chronicles of the 14th and 15th centuries but could refer to the entire citadel and not just the Heptapyrgion.
The principal reliable testimony regarding the fortress is the inscription placed over its gate, which indicates that it was rebuilt by Çavuş Bey, the city's first Ottoman governor, in 1431,[1] immediately after the Ottoman conquest of the city: This acropolis was conquered and captured by force, from the hands of the infidels and the Franks, with the aid of God, by the Sultan Murad, son of Sultan Mehmed, whom God never ceases to give the banner of victory.
In a 1591 account, the fort, referred to as the Iç Kale ("Inner Castle"), serves as the residence of the city's military governor and has a 300-strong garrison.
The exact date is not known with certainty, but the prison is mentioned in an 1899 map of the city, thus providing a terminus ante quem for the change.
The fortifications themselves were only little modified, although their role was effectively reversed: designed to protect its residents from outside dangers, they now served to isolate the inmates from the outside world.
The exterior buildings, on the fort's southern side, housed the administration, the women's prison and, to the west, the isolation cells.