There are basically three types of prison in Turkey: closed, semi-open, and open. A further distinction is made between ordinary closed prisons and high-security prisons. Many prisons have separate blocks (or wings) for women and some also for children (juveniles), but there are also some prisons which are exclusively for women or children. Prisoners in Turkey are divided, as in many other countries, into remand prisoners (those being held in pre-trial detention) and convicted prisoners (whose sentences are being executed).
In the Ottoman Empire prisons were called dungeons (zindan). In Turkey these were mostly dark and damp towers. The first prison was built in Sultanahmet quarter of Istanbul and it was called general prison (Hapishane-i Umumi).
Besides the death penalty the Penal Code of 1858 included three different types of sentences: rowing on a galley (kürek), pillorying (prangabentlik) and imprisonment in a tower (kalebentlik).
The Penal Code of 1 March 1926 (Law 765) made a difference between heavy crimes and corresponding sentences (ağır suç and ağır ceza) and light crimes (hafif suç and hafif ceza). Besides offences (cürüm) there is a separate law on infringements (kabahat). By Law 5349 dated 11 May 2005 the differentiation between light and heavy sentences was lifted.
On 12 September 1980 the military seized power in Turkey and the five generals (General Staff) announced martial law in all of the then existing 67 provinces. Members of armed and unarmed left and right organizations that had been engaged in bitter fighting were charged at military courts and in some places held in military prisons. The military prison Mamak in Ankara, Metris Prison (in Istanbul) and the prison in Diyarbakır (often called dungeon) gained notoriety.