ring wall that was constructed around the arsenal building. Loss to Sweden Under the terms of the Treaty of Roskilde in 1658, Denmark–Norway ceded the Danish provinces of Scania, Blekinge and Halland (the latter was agreed to belong to Sweden for a period of 30 years after the Peace of Brömsebro, but was given to Sweden permanently in the treaty of Roskilde) and the Norwegian provinces Trøndelag and Bohuslän (including the Bohus Fortress). Last Siege After an unsuccessful attempt to recapture the fortress in 1676, a Norwegian army under the command of Ulrik Fredrik Gyldeløve returned in June 1678. Some 850 defenders faced 16.000 attackers, who fired 20-30.000 iron gun shots, 2265 "bombs" with chemical and biological content, 384 explosive grenades, 384 "great stone boulders", 161 glowing fire shots, 79 sacks filled with grenades and 600 "great mortar rounds". Also a number of mines was exploded under the outer walls. After six weeks of constant battering, the fortress was saved by an approaching Swedish detachment. At this time, there was 400 survivors in the fortress, 300 dead, and 120 wounded "who had their arms and legs shot off". The fortress itself was almost completely ruined and the repairs went on for some 50–70 years, but with small financial support and only the most important work was done. After Denmark–Norway ceded the territory which included Bohus Fortress, Fredriksten Fortress was constructed in Fredrikshald on the newly established Norwegian-Swedish border. Since the Bohus Fortress no longer lay on the border, it was of small use to Sweden, which relied on the existing New Älvsborg at Gothenburg and the new Carlsten Fortress built at Marstrand. Prison Instead the fortress was used as a prison. The most noted prisoner was the radical pietist Thomas Leopold, who spent 42 years of his life behind bars, 32 of those at Bohus, for his alleged heresies. His stone-clad cell still exists in the castle. In the tower Fars Hatt, the original dungeon is still visible from above. A report from the 18th century states this as "a great depth, which has a floor of an iron net, upon which the delinquent has to walk and sleep. The floor accepts all their faeces, but then returns an unbearable stench, that soon makes the poor prisoner confess whatever crime he has committed". In those days, you were only put in prison until you confessed - then you got your