From 1872 part of the barracks were turned into prisons (Bandietenhuis). During World War II these barracks also served as a concentration camp for Germans, amongst whom were the men of the Goslar, a ship that was sunk by the men itself. The concentration camp also interred people from the Dutch colony in India. They were suspected of being sympathetic towards the NSB (National Socialistic Movement, the most important Nazi party at the time).
Life in this prison was extremely tough. It was common for 9 to 15 people to be placed in 1 cell, there were only very basic hygiene facilities and it was extremely hot. There were also 4 isolation cells. Bad behaviour was punished by a one week stay in one of these pitch black, non ventilated rooms.
The prison remained in use until 1982. Currently part of the prison is used for exhibitions.