Ship prison (4)
I believe the answer is:
brig
(Other definitions for brig that I've seen before include "A ship; army officer (abbr.)" , "Two-masted square-rigged sailing ship" , "'Two-masted,square-rigged ship (4)'" , "Sailing vessel or lock-up on board" , "Two-master; army officer (abbr.)" .)