"if a ship detained at a port under subsection leaves the port before it has been released from detention the master and the owner of the ship each commits an offence punishable upon conviction by a fine not exceeding r or by imprisonment for a period not exceeding five years or both"