In this paper we extend existing models for Master Bay Planning by handling containers holding dangerous goods, so-called IMO containers. Incompatible IMO containers must be separated from each other on board a vessel according to specic rules. These rules affect both Master Bay Planning and Slot Planning, which are the two planning problems normally handled in container stowage planning. Some research is doneto include IMO containers in Slot Planning, but, to the best of our knowledge, this is the rst time handling of IMO containers is included in Master Bay Planning. We present results from computational tests showing that our model can be solved to optimality, or near optimality, in reasonable time for realistically sized instances.